[blfs-support] Using and Configuring Sudo

Dan McGhee beesnees at grm.net
Thu Nov 21 10:45:01 PST 2013

This is the first time I have setup and configured 'sudo' in an LFS 
build.  I'm trying to learn this so that if I add an account for someone 
besides me I can set it up.

I want to be able to run halt, shutdown and reboot without invoking sudo 
or su and without using a password.  I know I can do this by adding 
/sbin to my LFS path, but that would forestall any learning I'm trying 
to do.

I think that the first thing I must do is add aliases to either .bashrc 
or .bash_profile for 'sudo reboot' et al.  Once I figure out which file 
to put that in I think it's just a matter of

alias=<something> <comand>

Then I need to edit the line "dan ALL=(ALL) ALL" in /etc/sudoers to read:

dan ALL=(ALL) ALL:NOPASSWD /sbin/halt,/sbin/shutdown,/sbin/reboot

Am I on the right track?


More information about the blfs-support mailing list