add sudoers
This commit is contained in:
parent
838a808246
commit
207e56b95d
2 changed files with 32 additions and 1 deletions
|
@ -65,6 +65,7 @@ apt install -y --no-install-recommends \\
|
||||||
man \\
|
man \\
|
||||||
console-data \\
|
console-data \\
|
||||||
locales \\
|
locales \\
|
||||||
|
sudo \\
|
||||||
xserver-xorg \\
|
xserver-xorg \\
|
||||||
jwm \\
|
jwm \\
|
||||||
xdm \\
|
xdm \\
|
||||||
|
@ -88,7 +89,7 @@ apt install -y --no-install-recommends \\
|
||||||
/tmp/xdgmenumaker*.deb
|
/tmp/xdgmenumaker*.deb
|
||||||
|
|
||||||
echo -e "debian\ndebian" | (passwd root)
|
echo -e "debian\ndebian" | (passwd root)
|
||||||
useradd -m -s /bin/bash debian
|
useradd -m -U -s /bin/bash debian
|
||||||
echo -e "debian\ndebian" | (passwd debian)
|
echo -e "debian\ndebian" | (passwd debian)
|
||||||
### Configure timezone and locale
|
### Configure timezone and locale
|
||||||
#dpkg-reconfigure locales
|
#dpkg-reconfigure locales
|
||||||
|
@ -110,6 +111,9 @@ $CHROOTCMD /bin/bash /tmp/install_base.sh || error
|
||||||
message "copy nanodesk config files into chroot"
|
message "copy nanodesk config files into chroot"
|
||||||
sudo cp -r src/* build/chroot/
|
sudo cp -r src/* build/chroot/
|
||||||
|
|
||||||
|
message "correct file permissions"
|
||||||
|
$CHROOTCMD /usr/bin/chmod 440 /etc/sudoers
|
||||||
|
|
||||||
### liveboot part, https://www.willhaley.com/blog/custom-debian-live-environment/
|
### liveboot part, https://www.willhaley.com/blog/custom-debian-live-environment/
|
||||||
message "checking liveboot directories"
|
message "checking liveboot directories"
|
||||||
for dir in $(echo build/{staging/{EFI/BOOT,boot/grub/x86_64-efi,isolinux,live},tmp})
|
for dir in $(echo build/{staging/{EFI/BOOT,boot/grub/x86_64-efi,isolinux,live},tmp})
|
||||||
|
|
27
src/etc/sudoers
Normal file
27
src/etc/sudoers
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#
|
||||||
|
# This file MUST be edited with the 'visudo' command as root.
|
||||||
|
#
|
||||||
|
# Please consider adding local content in /etc/sudoers.d/ instead of
|
||||||
|
# directly modifying this file.
|
||||||
|
#
|
||||||
|
# See the man page for details on how to write a sudoers file.
|
||||||
|
#
|
||||||
|
Defaults env_reset
|
||||||
|
Defaults mail_badpass
|
||||||
|
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
|
||||||
|
# Host alias specification
|
||||||
|
|
||||||
|
# User alias specification
|
||||||
|
debian ALL=(ALL) NOPASSWD: ALL
|
||||||
|
# Cmnd alias specification
|
||||||
|
|
||||||
|
# User privilege specification
|
||||||
|
root ALL=(ALL:ALL) ALL
|
||||||
|
|
||||||
|
# Allow members of group sudo to execute any command
|
||||||
|
%sudo ALL=(ALL:ALL) ALL
|
||||||
|
|
||||||
|
# See sudoers(5) for more information on "@include" directives:
|
||||||
|
|
||||||
|
@includedir /etc/sudoers.d
|
Loading…
Reference in a new issue