su command question

Robert Dailey rcdailey at gmail.com
Sat Jul 5 19:47:02 UTC 2008


On Sat, Jul 5, 2008 at 1:42 PM, Smoot Carl-Mitchell <smoot at tic.com> wrote:
> On Sat, 2008-07-05 at 13:31 -0500, Robert Dailey wrote:
>>
>> I recall that running "sudo <command>" outside of a script results in
>> a password prompt for my own password, but it only asks for this once.
>> Subsequent "sudo" commands do not prompt me for a password. Will this
>> behave differently in a script?
>
> You are correct.  The prompt is for your own password.  There is no
> prompt for the "ventrilo" user password. sudo creates a timestamp file
> and will only reprompt you for a password after 5 minutes of inactivity.
>
> If you use sudo in a script which is run by an ordinary user, you will
> still get the password prompt.  As explained earlier, if you want to
> allow users to run a command using sudo, but suppress the password
> prompt, use the NOPASSWD flag in the /etc/sudoers file for the command.

But the fact that there's still a prompt- that's what bothers me, I
don't really care who's password it's wanting. It looks like the
solution to my problem is the /etc/sudoers file. I'll try this and get
back with you guys.

I appreciate everyone's help. This is an awesome community! I'll write
back if I have any other issues.




More information about the ubuntu-users mailing list