Omega - Sudo for first user?
Jarod Wilson
jarod at wilsonet.com
Wed Oct 1 17:18:25 CEST 2008
On Wed, 2008-10-01 at 20:13 +0530, Rahul Sundaram wrote:
> Hi,
>
> If I stuck this portion into the fedora-live initscript, it would enable
> sudo for the first user entered during firstboot. Does this seem like a
> sensible thing to do? Does anyone have the details handy on modifying
> consolehelper as well?
>
> -----------------
>
> # 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 -G wheel $USER
> echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
> fi
>
>
> EOF
If you go the %wheel route, don't echo it onto the bottom of the file,
sed the line that's already in there with a hash in front of it.
----8<----
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
----8<----
Otherwise, you've got both the commented and uncommented versions of
that line in there, and the actual active one is nowhere near the
explanation comment.
However, I'd keep an eye on this:
https://bugzilla.redhat.com/show_bug.cgi?id=135592
Sounds like its being considered, and might also include an "enable sudo
for this user" option.
--
Jarod Wilson
jarod at wilsonet.com
More information about the rpmfusion-developers
mailing list