On Thu, Dec 20, 2007 at 10:21:40PM -0500, Douglas A. Tutty wrote: > On Thu, Dec 20, 2007 at 11:35:32AM -0800, Alou Dialy wrote: > > I figured out that I didnt have /sbin and /usr/sbin in > > my PATH but how come when I do sudo env it does show > > those directories in my PATH ? > > > > The man page for sudo or sudoers says that sudo does > > modify PATH but it doesnt say how and it doesnt say > > how it tries to find the command that you give it. > > > > Is there a way to set up sudo so that I dont have to > > type the full path to the command. > > How about an alias in your own .bash_aliases? > > alias shutdown "sudo /sbin/shutdown" > > Or something? > > Doug. > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] >
su to root then type the command visudo under "User privilege specification" add the following # User privilege specification root ALL=(ALL) ALL ajm57 ALL=/sbin/shutdown,\ /bin/mount,\ /bin/umount Change ajm57 to your user name then save the file. You can add as many system command as you wish. So when you want to shutdown simply type sudo shutdown -h now it will ask you for your user password (don't type in your root password) -- Alexander J. M. Linux 2.6.18-5-686 i686 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]