PDA

View Full Version : using sudo


David Berg
30th November 2006, 07:10 PM
I'm in the process of switching from ubuntu to Fedora and am so far
impressed. The first thing I want to change is how administration is
handled. I like ubuntu's decision to remove the root password and only
allow root access through sudo.

So I gave myself full sudo access, disabled root logins, and eliminated
the root password. Works great on the command line.

The problem is this: How can I get the gui's to switch from wanting to
use an su interface (and asking for a non-existant root password) to
using sudo?

Is there setting or link I can change to have everything switch over?

--Dave

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Matthew Miller
30th November 2006, 07:19 PM
On Thu, Nov 30, 2006 at 08:22:28AM -0600, David Berg wrote:
> So I gave myself full sudo access, disabled root logins, and eliminated
> the root password. Works great on the command line.

put yourself in the "wheel" group. (I recommend then giving yourself sudo
access simply with "%wheel ALL=(ALL) ALL", but whatever.)

Then, append the line "UGROUPS=wheel" to the end of every file in
/etc/security/console.apps which you want to have sudo-like behavior.

Unfortunately, there's no way to do this globally, but a little shell loop
could do the trick.

--
Matthew Miller mattdm@mattdm.org <http://mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Rex Dieter
30th November 2006, 07:50 PM
David Berg wrote:

> I'm in the process of switching from ubuntu to Fedora and am so far
> impressed. The first thing I want to change is how administration is
> handled. I like ubuntu's decision to remove the root password and only
> allow root access through sudo.
>
> So I gave myself full sudo access, disabled root logins, and eliminated
> the root password. Works great on the command line.
>
> The problem is this: How can I get the gui's to switch from wanting to
> use an su interface (and asking for a non-existant root password) to
> using sudo?

kde and kdesu can be configured to use sudo, just put this in
/usr/share/config/kdesurc:
[super-user-command]
super-user-command=sudo

-- Rex


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

David Berg
3rd December 2006, 01:20 AM
Matthew Miller wrote:
> On Thu, Nov 30, 2006 at 08:22:28AM -0600, David Berg wrote:
>> So I gave myself full sudo access, disabled root logins, and eliminated
>> the root password. Works great on the command line.
....
>
> Then, append the line "UGROUPS=wheel" to the end of every file in
> /etc/security/console.apps which you want to have sudo-like behavior.

Thank-you.

This gives the desired behavior for users in group wheel. However, for
users not in wheel it still asks for the nonexistent root password. Is
there a way to have the system simply state something like, "You don't
have permission to access this program. Contact your system administrator?"

Or perhaps there is a man page/doc I should take a look at instead of
asking here. Any pointers?

--Dave

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Matthew Miller
3rd December 2006, 01:40 AM
On Sat, Dec 02, 2006 at 06:18:32PM -0600, David Berg wrote:
> >>So I gave myself full sudo access, disabled root logins, and eliminated
> >>the root password. Works great on the command line.
> >Then, append the line "UGROUPS=wheel" to the end of every file in
> >/etc/security/console.apps which you want to have sudo-like behavior.
> Thank-you.
> This gives the desired behavior for users in group wheel. However, for
> users not in wheel it still asks for the nonexistent root password. Is
> there a way to have the system simply state something like, "You don't
> have permission to access this program. Contact your system administrator?"

Yes. In each of these files, there is a line which say says "USER=root".
Change that to "USER=<none>" (brackets and all), and, in combination with
UGROUPS=wheel, you'll get this behavior. (Anyone in wheel will be asked for
their own password; anyone else will get an "Insufficent Rights" error.
Which isn't as helpful as "contact your sysadmin", but close.)

> Or perhaps there is a man page/doc I should take a look at instead of
> asking here. Any pointers?

It's all documented in the "userhelper" man page, which I realize isn't
obvious.


--
Matthew Miller mattdm@mattdm.org <http://mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list