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

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


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