Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was wondering what is the best way to start the guest session from the login screen (GDM).

Currently, I created a new user called 'ubuntu-guest' (has to be something other than 'guest'). Then added the following script to the Startup Applications.

#!/bin/bash
/usr/share/gdm/guest-session/guest-session-launch &
/usr/bin/gnome-session-save --logout

The problem with this method, is that when you log in as 'ubuntu-guest', you have to start up two gnome sessions: one for 'ubuntu-guest' and one for the actual guest account.

Please let me know if you have any other better ideas. Thanks!

share|improve this question

3 Answers 3

up vote 4 down vote accepted

1. Never allow any Temporary User without a password to gain Access Control of your computer! FIRST Make a policy to prevent the single user guest from making system wide changes open text editor gksu gedit /etc/polkit-1/localauthority/50-local.d/10-desktop-policy.pkla insert text

[guest-policy]
Identity=unix-user:guest
Action=*
ResultAny=no
ResultInactive=no
ResultActive=no

2. open terminal and start typing

sudo addgroup --system --quiet --gid 126 guest
sudo useradd -c Guest,,, -d /tmp/guest-home.UBUNTU -m -s /bin/bash -g guest guest
sudo usermod --uid 117 --gid 126 guest

to create blank password for this account:

sudo usermod --password U6aMy0wojraho guest

to create Not asked for password on login for this account:

sudo usermod --groups nopasswdlogin guest

Edit /etc/gdm/gdm.schemas type:

gksu gedit /etc/gdm/gdm.schemas

and add guest to greeter/Include default

    <schema>
      <key>greeter/Include</key>
      <signature>s</signature>
      <default>guest</default>
    </schema>

now sudo restart gdm

NOTE: you will no longer be abel login to guest sessions from user accounts this is the new guest session and you will only be able to login from login screen any changes to this account will remain on logout until the computer restarts.

to restore open terminal and type:

sudo userdel guest

then sudo restart gdm

to copy your settings for guest session

sudo cp -R ~/.gconf/desktop /etc/gconf/gconf.xml.system/
sudo cp -R ~/.gconf/apps /etc/gconf/gconf.xml.system/
sudo chmod 777 -R /etc/gconf/gconf.xml.system/desktop
sudo chmod 777 -R /etc/gconf/gconf.xml.system/apps
share|improve this answer

Lock Down

You might want to look into this answer if you want to »Lock Down« a user account.

share|improve this answer

There are forum posts and bug reports a-plenty on this. In one bug report, someone described a redneck guest session account they set up that might work for you.

1.- Create a count without privileges (example Guest). Then password = guest

:P Any easy.

2.- Configure this count (Guest).

3.- Add all files (included hidden) to a .tar file and save it (example /etc/init.d/guest.tar)

4.- Create this file /etc/init.d/guest.sh With this context:

#!/bin/sh
rm -rf /home/guest
mkdir /home/guest
chown guest:guest /home/guest
tar -C /home/guest -xvf /etc/init.d/guest.tar

5.- In terminal:

sudo chmod +x /etc/init.d/guest.sh
sudo update-rc.d guest.sh defaults
share|improve this answer
    
This is a good idea for implementing your own guest account. I was wondering how to log into the "existing" guest account that comes with Ubuntu (i.e. Power menu -> Guest Session). –  Odd-rationale Aug 1 '10 at 18:42
    
Actually, there is no guest account. It's a guest session. When you start a guest session, a new account is created with limited permissions. When you exit the session, the account is deleted along with its home directory. So what I have above is a primitive re-implementation of that feature with the ability to log in from the startup screen, a feature that (according to the bug mentioned above) the Ubuntu devels have no intention of implementing. –  mac9416 Aug 1 '10 at 20:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.