Re: FC11 logging in as root - FC10 change not enough?

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

 



Dave Cross wrote:
2009/10/30 Robert Moskowitz <rgm@xxxxxxxxxxxxxxx>:
Dave Cross wrote:
2009/10/30 Robert Moskowitz <rgm@xxxxxxxxxxxxxxx>:

At times I find I need to login as root.

You really don't.

For example, as a regular user su to root, then start gedit from that
terminal session.  Look at all the errors generated.  And at least in
FC10, I could still change preferences, but in FC11, they all come up
grey. There are other things in gnome that don't launch right from an
SUed terminal session.  So when I want to 'fix' things, I find it better
to just log in as root.
I think you need to understand the difference between "su" and "su -".

But really you need to get to grips with "sudo" as a better
replacement for "su".

Steps I always take on a new Fedora box to make my life easier.

1/ "su -" to become root.
2/ "visudo" to edit the sudoers file.
3/ Uncomment the first line referencing the "wheel" group.
4/ Save the file.
5/ Edit "/etc/groups" to add myself to the wheel group.
6/ Exit from "su -".
Is this better than just adding your userid to the sudoers file?

There's almost certainly a good reason for doing it this way that I've
forgotten in the mists of time. Some ideas that spring to mind:

* This has been a standard Unix approach for as long as I can
remember. I was doing this on HP-UX systems almost twenty years ago.
* I can use the same method on my own desktop as I use on a larger
system where I want to give rights to multiple people.
* I only need to edit sudoers once. From then on I can control
permissions simply by editing membership of the group (which can be
done with a GUI tool as well as by editing the text file).

OK. So I enable group wheel with visudo. Then I look into adding me to the group.

I see the following files in /etc that have group wheel: group, group-, gshadow, and gshadow-

You only said to add to group.

With just an editor like VI? I went to System>Administer>'Users and Groups' and went to the Groups tab. Wheel is NOT listed there.



And I will have to learn a bit about the difference between 'su' and 'su -'.

"su -" gives you a login shell. So it's as though you actually logged
on as root. "su" just changes the user. It doesn't, for example, give
you root's PATH.

Let us know if you have any more questions.

Dave...


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux