Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Desktop (http://www.linux-archive.org/fedora-desktop/)
-   -   Sudo for first user (http://www.linux-archive.org/fedora-desktop/170710-sudo-first-user.html)

Rahul Sundaram 10-04-2008 04:14 PM

Sudo for first user
 
Hi

You can add the following snippet to the fedora-desktop ks file into a
init script to make sudo just work for the first user. It can't be added
to %post since firstboot wouldn't have launched then. Let me know what
you think:


-----------------

# check for the first user and add it to user wheel and then to sudoers

USER=$( grep 500 /etc/passwd | cut -d: -f1 )
GROUPS=$( groups $USER )
if ! groups $USER | grep -q wheel ; then
usermod -a -G wheel $USER
sed -i 's/# %wheel ALL=(ALL) ALL/ %wheel ALL=(ALL)
ALL/' /etc/sudoers

fi


EOF
------------

Rahul

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list

"Jon Stanley" 10-04-2008 04:28 PM

Sudo for first user
 
On Sat, Oct 4, 2008 at 12:14 PM, Rahul Sundaram
<sundaram@fedoraproject.org> wrote:
> Hi
>
> You can add the following snippet to the fedora-desktop ks file into a init
> script to make sudo just work for the first user. It can't be added to %post
> since firstboot wouldn't have launched then. Let me know what you think:

I'm not sure what the point of this is honestly - you already know who
the user is on the LiveCD, so you can just give them sudo in %post.

For the install case (which I think is what you're getting at here), I
personally would rather fix this the Right Way(TM) for both LiveCD and
installations from DVD, which is to give %wheel sudo in the sudo
package, and offers an option in firstboot 'Make this user an
administrator?'

The reasoning against that is that it brings up issues when using a
centralized authentication service - I think that we could probably
make authconfig smart enough to yank that out if that's the case.

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list


All times are GMT. The time now is 02:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.