Why break sudo? (was: Installing software in user friendly way)

Vram lamsokvr at xprt.net
Wed Jul 13 20:14:52 UTC 2005


On Wed, 2005-07-13 at 08:17 +1000, James Gray wrote:
> On Tue, 12 Jul 2005 09:27 pm, Henning Kilset Pedersen wrote:
> > Start a terminal. Give the root user a password if you havent (sudo
> > passwd root - type YOUR user password first, then the new root password
> > twice).
> 
> Hijacking this thread - apologies.
> 
> Pet peeve: why are so many people insistent on BREAKING the very security 
> mechanisms that have been built into Ubuntu?!  You told a self-confessed 
> noob, to break the config to a non-standard Ubuntu setup!
> 
> If people absolutely MUST have a root shell, use "sudo bash" or "sudo -s -H".  
> Personally I don't see the big deal of either of those sudo incarnations 
> versus "su -".  We're talking a handful of keystrokes here which, if it 
> really bugs you, can be added as a shell alias anyway :) eg,
> alias r="sudo -s -H"
> 
> Put that in ~/.bash_profile then all you need to get a root shell is to type 
> "r" (as in "r"oot).  Enter your user password and voila!  I've even hacked 
> by .bashrc so that my normal user account has a different prompt to my root 
> shell:
> if [ `echo $UID` -eq 0 ]; then
>     PS1="\n\[\033[1;31m\]\u@\h - \[\033[1;32m\]\w\n\[\033[0;37m\]>"
> else
>     PS1="\n\[\033[1;36m\]\u@\h - \[\033[1;32m\]\w\n\[\033[0;37m\]>"
> fi
> 
> That's a colour prompt (red=root, cyan=my normal user account), and not 
> everyone's preferred "style" but have a play :)  My point is, that I can 
> separate my normal user account and root shells so that it mimics the 
> behaviour of a traditional *nix "root-enabled" setup without sacrificing the 
> Ubuntu-way.
> 
> OK, I'm off my soap-box now.  Flame away :)
> 
> James


I think it is a GOOD idea!!!  Who told you??  <hehe>

Vram





More information about the ubuntu-users mailing list