[blfs-support] Su and Sudo--Getting Both to Work
bruce.dubbs at gmail.com
Mon Dec 2 10:46:56 PST 2013
Dan McGhee wrote:
> Since I installed 'sudo,' I cannot, when logged in as myself, run 'su.'
> The vast majority of the time, I don't need it, but when building and
> installing using package users, I would like to be able to 'su' to root
> so that I can use my install system. Before I got X working it wasn't a
> problem. I just switched back and forth between terminals. But now
> that X is working, I want to be able to 'su' in xterm.
sudo should not affect su. You may want to try resetting your password.
Also, why don't you start two xterms and switch between them?
> When I try, I get "Crypt error."
I go that yesterday when I locked an account, but it went away when I
unlocked it. I think it just means bad password, but there is an issue
there that it gives the wrong message.
I don't know if it's a 'sudo' or
> 'shadow' thing. I haven't been able to glean anything from the man
> pages. Oh, I think I can make the appropriate entries in "sudoers," but
> then I'd have to type "sudo su." If that's the way it is, I'll just
> have to get used to it.
You should be able to just type 'sudo' if you build it with
--enable-noargs-shell and --enable-shell-sets-home. I also use
> I'd also like to be able to run "halt' and 'reboot' without typing 'sudo
See the BLFS page for sudo configuration:
dan ALL = NOPASSWD: ALL
should do it for you if you also create som aliases:
alias halt='sudo /sbin/halt'
etc. I personally like the alias svi='sudo vim'
More information about the blfs-support