File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,20 @@ if [ x"$SHELLS_USERNAME" != x ]; then
8888 chmod 0700 " /root/.ssh"
8989 chmod 0600 " /root/.ssh/authorized_keys"
9090 fi
91+
92+ if [ -d /usr/share/xubuntu/ ]; then
93+ groupadd -r autologin
94+ [[ -d /run/openrc ]] && sed -i -e ' s/^.*minimum-vt=.*/minimum-vt=7/' /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
95+ gpasswd -a " ${SHELLS_USERNAME} " autologin
96+ echo [SeatDefaults] > /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
97+ echo autologin-user=${SHELLS_USERNAME} >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
98+ echo autologin-user-timeout=0 >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
99+ echo user-session=xubuntu >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
100+ echo pam-autologin-service=lightdm-autologin >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
101+ echo " auth sufficient pam_succeed_if.so user ingroup nopasswdlogin" >> /etc/pam.d/lightdm
102+ groupadd -r nopasswdlogin
103+ gpasswd -a " ${SHELLS_USERNAME} " nopasswdlogin
104+ fi
91105
92106 if [ -f /etc/lightdm/lightdm.conf ]; then
93107 # autologin for lightdm
You can’t perform that action at this time.
0 commit comments