su command question

Nils Kassube kassube at
Sat Jul 5 16:14:24 UTC 2008

Robert Dailey wrote:
> Basically, I'm trying to run a Ventrilo server, but the documentation
> for Ventrilo suggests that you run the server as a user named
> "ventrilo". That way, I can use chmod and chown to give the server
> access rights to the files that the Ventrilo server will be
> needing/accessing. The exact line of script I posted in my original
> post was the suggested script to be run. However, I was surprised to
> find (mainly due to my lack of experience) that I had to enter a
> password prompt each time I ran my script to start the server.
> I plan to make this script "hands-free", because later on I'm going to
> be adding this to my /etc/rc.d/rc.local so that the server starts by
> itself every time I reboot the server. "hands-free" here means
> basically that the script does not require any user interaction, such
> as requesting passwords.

If the script is run from /etc/rc.d/rc.local it will be run by root. Then 
there is no password prompt because root may su to any user without being 
asked for a password. So your original command is OK already. You can 
test it if you get a root shell using the command "sudo su". If you then 
try the command again you will see that there is no password prompt.


More information about the ubuntu-users mailing list