Re: root passwd



On 04/25/2010 02:21 AM, Roger wrote:
I always set up /etc/sudoers to allow user many but not all root privileges
Using root is dangerous.

su
enter root password
vim /etc/sudoers

You should really use visudo to edit the file. It takes care of
things like locking the file, (not really needed on a one-admin
system) and adding some syntax checking. It also defaults to the
correct file name.

go to the line which says
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
under that enter your username <tab> All=(ALL) <tab> ALL
where <tab> is the tab key.
esc wq! to save and quit

When you need root access from a terminal type sudo <some command> and
it will ask for your user password.
type exit or close the terminal to exit sudo.

There are probably better ways but this works for me.
Roger

One fairly easy way is to give access to a specific group, and then
make the users you want to be able to use sudo members of that
group. There is an example you can uncomment in /etc/sudoers.

%wheel ALL=(ALL) ALL

Another way, that you may find easier to maintain is to put this
part of the configuration in a file in /etc/suduers.d...

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


Relevant Pages

  • Re: debian and ubuntu - answer from user not pretending to be guru
    ... convenient, for most things, and I do not like the sudo that Ubuntu uses; ... prefer su - root. ... I'm not looking to criticize your choice, but the setting on Ubuntu to lock ... If you want to use a root password on Ubuntu, ...
    (Debian-User)
  • Re: Firefox 1.5.0.7 RPM
    ... I need root password to sudo. ... because sudoers can do just as stupid things as root. ...
    (alt.os.linux.suse)
  • Re: [root user] How to disable root account?
    ... >> root password in any way. ... > Actually that depends on how sudo is configured. ... > sudo does depend on the root password ... This session would be used only to reverse ...
    (Debian-User)
  • RE: SUDO
    ... Allowing sudo su - is a bad idea, ... If the user knows the root password, ... the user can already run the needed commands. ...
    (RedHat)
  • Re: Root, su, and sudo (was Re: More on Ragostagate
    ... But it doesn't need root to be enable for sudo to work. ... that it *will* work without a root password. ... "If you raise the ceiling 4 feet, move the fireplace from that wall ...
    (comp.sys.mac.advocacy)