This howto to create a user account in guest mode, that is the $HOME of this user will be in /tmp folder, the contents of this folder will be deleted each time the box is reinitializated.
Would’in be nice to have an account like this in a cibercafe or library, here we go:
First the Guest account can not be access upon startup, in order to access the guest account you must login with in a existing user, so we create our own group and user:
sudo groupadd ciber
sudo adduser --shell /bin/bash --ingroup ciber --disabled-password ciberuser
sudo passwd ciberuser
Make a folder where we put our little script to lock user into /tmp:
sudo mkdir /home/ciberuser/.ciberuser
Create script and change executing permit:
sudo echo "#!/bin/bash\n/usr/share/gdm/guest-session/guest-session-launch&" > /home/ciberuser/.ciberuser/ciberuser.bash
sudo chmod +x /home/ciberuser/.ciberuser/ciberuser.bash
Create directories and the file for autostart of gnome:
sudo mkdir /home/ciberuser/.config
sudo mkdir /home/ciberuser/.config/autostart
sudo echo "[Desktop Entry]\nType=Application\nExec=/home/ciberuser/.ciberuser/ciberuser.bash\nHidden=false\nNoDisplay=false\nX-GNOME-Autostart-enabled=true\nName[es_MX]=ciberuserjail\nName=ciberuserjail\nComment[es_MX]=ciberuser jail\nComment=ciberuser jail"> /home/ciberuser/.config/autostart/ciberuser.bash.desktop
Change ownership of $HOME
sudo chown -R ciberuser:ciber /home/ciberuser
Now go to Menu -> Administration -> Login Screen Unblock and select ciberuser, and activate access as ciberuser at start up, give a time of 10 seconds and exit.
Then goto Menu -> Administration -> User and Groups and select ciberuser
Activate the Account and Select Password, mark the Dont Ask for a Passwortd Box, and you done.
Thats it, i hope this mini tutorial is usefull.
Filed under: Debian, English (Ingles), Linux, Ubuntu |
A more recent post about this articule can be found at:
http://wiki.shellium.org/w/Howto_Enable_GUEST_account_at_start_in_Lucid_Ubuntu_Linux_without_prompting_for_user_password.or_FREEZE_an_Account