[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use sudo not root



* Richard <richard.vd.veen@gmail.com> [2006-06-16 14:56]:
> On 16/06/06, Magnus Therning <magnus@therning.org> wrote:
> > On Fri, Jun 16, 2006 at 15:41:11 +0800, Richard wrote:
> > > On 15/06/06, Joseph Smidt <jsmidt@byu.edu> wrote:
> > > > When I installed Debian I selected to not allow root login
> > > > thinking that would enable sudo and disable root.  But when I
> > > > logged into gnome it kept asking for the root password to do
> > > > admin things, so I set a  root password and it works.
> > > > However, I would like to disable root and have it so my sudo
> > > > password works for all the gnome admin things, like opening
> > > > synaptic.  How do I do that?  Thanks.  Joseph Smidt
> > >
> > > I think you should login as root and run the commands:
> > >
> > > usermod -G $USER $GROUPS,adm
> >
> > A shorter option (sorry couldn't help myself):
> > # usermod -a adm $USER
> 
> Yes you are right

Or even simpler:
# addgroup $USER $GROUP

> > > visudo
> > >
> > > # Members of the admin group may gain root privileges
> > > %adm ALL=(ALL) ALL
> >
> > Rather then using the group that exists to allow users to read log
> > files[1] it might be better to use the root group or create a
> > special group for this purpose.
> 
> Right again :-)
> 
> %admin ALL=(ALL) ALL
> 
> should do ... as they have in ubuntu

What about group `wheel' ?

> > > And then delete the password from root from your /etc/passwd and
> > > /etc/shadow files =second field
> >
> > I'd suggest using the -l argument to passwd instead of editing
> > /etc/passwd and /etc/shadow manually. If you still want to do it
> > manually you should probably use vipw to do it.
> 
> right again :-)

vipw.  Interesting.


- Felix

-- 
Felix C. Stegerman <flx@obfusk.net>                  http://obfusk.net
~ "Any sufficiently advanced bug is indistinguishable from a feature."
~   -- R. Kulawiec
~ vim: set ft=mail tw=70 sw=2 sts=2 et:

Attachment: pgpFXcaoJnEvH.pgp
Description: PGP signature


Reply to: