[juneau-lug] Re: How to repair sudo?

  • From: Mark Neyhart <Mark.Neyhart@xxxxxxxxx>
  • To: juneau-lug@xxxxxxxxxxxxx
  • Date: Wed, 08 Apr 2015 11:03:11 -0800

On 04/08/2015 08:59 AM, Kevin Miller wrote:
> On 04/07/2015 09:51 PM, Nels Tomlinson wrote:
>> I tried the Hail Mary, but Mary didn't hail back.  It was a good thought,
>> but changing the %sudo line didn't change anything.
>> Visudo saved the edited file as sudoers.tmp without any complaints.  I then
>> did mv /etc/sudoers /etc/sudoers.old and mv /etc/sudoers.tmp /etc/sudoers.
>>
>> I have attached sudo.old.
> 
> If you want, you can blow off the Ubuntu way of doing things and just 
> log in as good old root.  Go in as single user, and change roots 
> password.  After that you can just do a "su -" to get a root shell 
> instead of doing "sudo su -" or "sudo COMMAND".
> 
> I suppose the Ubuntu folks think it's safer to disable root login by 
> default, but I find it much handier to open a root shell and do what I 
> need to do then log out of it rather than doing sudo.
> 
> ...Kevin
> 
I also find it easier to open a root shell, do the work, and log out.
 I put this line in /root/.bashrc to show a bright red prompt while I
am logged in as root.  When I've got 6 terminals open at once the
color helps me keep track of which one is root.

export PS1='\[\e[1;31m\]\h:\w\$ \[\e[0m\]'

This line sets the primary prompt for the bash shell.  Here are the
meanings of the codes:

\[            Beginning of sequence of non-printing characters
\e[1;31m      ANSI Escape sequence to select Bold Red foreground color
\]            End of sequence of non-printing characters
\h            Print host name
:             Print :
\w            Print working directory
\$            Print $ (# for root user)
              Print space
\[            Beginning of sequence of non-printing characters
\e[0m         ANSI Escape sequence to remove all text attributes
\]            End of sequence of non-printing characters


------------------------------------
The Juneau Linux Users Group -- http://www.juneau-lug.org
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
word unsubscribe in the subject header.

Other related posts: