--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
# create a singularity group
groupadd -f singularity
# remount the root filesystem so we can use sudo
# this is the CRUCIAL step otherwise everything will fail
mount -o remount,rw,exec,suid /
# create a singularity user
if [ ! $(id -u singularity) ]
then
useradd singularity -m -g singularity
echo "singularity ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/singularity && \
chmod 0440 /etc/sudoers.d/singularity
fi
# build and install cower from the AUR (for example - change this to whatever package you want)
if [ ! -n "$(pacman -Qs cower)" ]; then
su - singularity -c "curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower"
su - singularity -c "makepkg PKGBUILD --skippgpcheck --install --needed"
su - singularity -c "rm -f PKGBUILD"
fi
# and finally remount the filesystem with nosuid
mount -o remount,rw,nosuid /
# delete the singularity user
userdel -r singularity
groupdel singularity
# and get rid of sudo prermissions in case someone recreates a singularity user
rm -f /etc/sudoers.d/singularity
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.