Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 5dbf537b authored by Robert Nelson's avatar Robert Nelson
Browse files

chroot: if sudo is installed, added admin group to /etc/sudoers


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent 0262b002
Branches
Tags
No related merge requests found
......@@ -484,11 +484,11 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
groupadd admin || true
default_groups="admin,adm,dialout,cdrom,floppy,audio,dip,video"
if [ "x${chroot_very_small_image}" = "x" ] ; then
packages="sudo"
for pkg in \${packages} ; do check_n_install ; done
fi
if [ -f /etc/sudoers ] ; then
pkg="sudo"
dpkg_check
if [ "x\${pkg_is_not_installed}" = "x" ] ; then
echo "Log: (chroot) adding admin group to /etc/sudoers"
echo "%admin ALL=(ALL) ALL" >>/etc/sudoers
fi
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment