On Fri, Jun 20, 2008 at 12:43 PM, Ralph Shumaker <[EMAIL PROTECTED]> wrote:
> Carl Lowenstein wrote:
>>
>> On Tue, Jun 10, 2008 at 9:29 PM, Michael Lynch <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Im trying to learn how to use Linux Command line
>>>
>>>
>>> How come when I try the command    "useradd"
>>> bash returns
>>>
>>> bash: useradd: command not found
>>>
>>>
>>
>> Because the command is located at /usr/sbin/useradd and /usr/sbin is
>> not in your default search path, which defines where the shell looks
>> for commands when you give them by name.   You can learn what your
>> path is by
>> $ echo $PATH
>>
>> Only root has the privilege of adding users, so the command wouldn't
>> work for you as an ordinary unprivileged user.
>>
>> Best to use the "sudo" command.  (Super User Do)
>>
>> $ sudo /usr/sbin/useradd
>> Password:                                          (asks for _your_
>> password)
>>
>>
>>     carl
>>
>
>
> What would be the drawback of launching gnome-terminal and doing "su -"?
> Would that leave me vulnerable somehow?
>
> If I understand correctly, sudo has to be set up to allow me each command I
> want to use, and asks for my password every time. I know that sudo can be
> set up to allow me ALL commands, but then what would be the advantage over
> having a gnome-terminal with "su -"?
>

First, sudo gives you a renewable time period during which you don't
have to give your password again.  The default value is 5 minutes.

Second, all commands given with sudo are logged to a file, so if
something disastrous happens, you can probably go back and review how
you did it.

    carl
-- 
 carl lowenstein marine physical lab u.c. san diego
 [EMAIL PROTECTED]

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to