sudoers file fix and automation.
This commit is contained in:
parent
5d59b2173d
commit
b158ec1e0e
2 changed files with 3 additions and 53 deletions
5
root.sh
5
root.sh
|
@ -71,6 +71,7 @@ printf "${BLUE}Running script as new user $USER...\n${NC}"
|
|||
cp /etc/sudoers /etc/sudoers.prelarbs
|
||||
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
sudo -u $USER bash /home/$USER/user.sh
|
||||
curl http://lukesmith.xyz/larbs/sudoers.sh > /etc/sudoers
|
||||
chown root:root /etc/sudoers.file
|
||||
|
||||
echo -e "root ALL=(ALL) ALL\n%wheel ALL=(ALL) ALL\n%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/packer -Syu,/usr/bin/packer -Syyu,/usr/bin/systemctl restart NetworkManager\nDefaults !tty_tickets"
|
||||
|
||||
dialog --title "All done!" --msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\n\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment.\n\n-Luke" 20 80
|
||||
|
|
51
sudoers.sh
51
sudoers.sh
|
@ -1,51 +0,0 @@
|
|||
|
||||
## sudoers file.
|
||||
##
|
||||
## This file MUST be edited with the 'visudo' command as root.
|
||||
## Failure to use 'visudo' may result in syntax or file permission errors
|
||||
## that prevent sudo from running.
|
||||
##
|
||||
## See the sudoers man page for the details on how to write a sudoers file.
|
||||
##
|
||||
|
||||
##
|
||||
## Host alias specification
|
||||
##
|
||||
## Groups of machines. These may include host names (optionally with wildcards),
|
||||
## IP addresses, network numbers or netgroups.
|
||||
# Host_Alias WEBSERVERS = www1, www2, www3
|
||||
|
||||
##
|
||||
## User alias specification
|
||||
##
|
||||
## Groups of users. These may consist of user names, uids, Unix groups,
|
||||
## or netgroups.
|
||||
# User_Alias ADMINS = millert, dowdy, mikef
|
||||
|
||||
##
|
||||
## Cmnd alias specification
|
||||
##
|
||||
## Groups of commands. Often used to group related commands together.
|
||||
# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
|
||||
# /usr/bin/pkill, /usr/bin/top
|
||||
# Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
|
||||
|
||||
##
|
||||
## Defaults specification
|
||||
##
|
||||
## You may wish to keep some of the following environment variables
|
||||
## when running commands via sudo.
|
||||
##
|
||||
## Locale settings
|
||||
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
|
||||
##
|
||||
## Run X applications through sudo; HOME is used to find the
|
||||
## .Xauthority file. Note that other programs use HOME to find
|
||||
## configuration files and this may lead to privilege escalation!
|
||||
# Defaults env_keep += "HOME"
|
||||
##
|
||||
## X11 resource path settings
|
||||
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
|
||||
##
|
||||
## Desktop path settings
|
||||
# Defaults env_keep += "QTDIR KDEDIR"
|
Loading…
Reference in a new issue