Sudo for first user

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



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-desktop-list

[Index of Archives]     [Fedora Users]     [Fedora KDE]     [Fedora Announce]     [Fedora Docs]     [Fedora Config]     [PAM]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux