You are not logged in.

#1 2008-11-28 10:42:07

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

guest user account à la ubuntu

hi there,

latest ubuntu features a guest account, which typically is an unprivileged user account that would allow anyone to use a computer, say, for browsing the internet for instance. anything the guest user does is volatile (is this the right word ?) : all data is deleted upon log out, bringing the computer to its previous state.

in ubuntu, this feature seems to be accomplished by gdm-guest-session package, which is a set of scripts and configuration files :

/etc/apparmor.d/gdm-guest-session
/usr/share/doc/gdm-guest-session/README.Debian
/usr/share/doc/gdm-guest-session/changelog.gz
/usr/share/doc/gdm-guest-session/copyright
/usr/share/gdm/guest-session/Xsession
/usr/share/gdm/guest-session/guest-session-cleanup.sh
/usr/share/gdm/guest-session/guest-session-launch
/usr/share/gdm/guest-session/guest-session-setup.sh

is there an (easy) way to implement such functionality in arch ?? (PKGBUILD ?)

thanks


what goes up must come down

Offline

#2 2008-11-28 14:27:26

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: guest user account à la ubuntu

Don't think you even need to install many scripts at all.

When GDM loads a user's session, then essentially it runs a couple of scripts, .xinitrc being one of them I assume, i've not really used a login manager properly in a while.

What you could do, relatively trivially, is to create a .xinitrc something like this

username=`whoami`

if [ $username -eq "guest"]; then
        rm -rf ~/*
        rm -rf ~/.*
        cp /etc/skel/{.xinitrc, .xsession} .
fi

as this would wipe all user settings out of the guest user folder.  Just give them minimal user rights to the user guest, and even make the .xinitrc / .xsession files readonly for that user.  Probably not the most secure way of doing it, but it might work in a simple scenario.

Offline

#3 2008-11-28 14:52:34

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: guest user account à la ubuntu

I was thinking about mounting /home/guest as a tmpfs. When the user logs out, /home/guest is unmounted and everything in it erased.


(lambda ())

Offline

#4 2008-11-28 15:17:23

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: guest user account à la ubuntu

andre.ramaciotti wrote:

I was thinking about mounting /home/guest as a tmpfs. When the user logs out, /home/guest is unmounted and everything in it erased.

That's probably a better way of doing it to be honest... I was just thinking that you would need some scripts there to load the environment, but it probably would work without.

Offline

#5 2008-11-28 15:42:29

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: guest user account à la ubuntu

i found source code here : http://bazaar.launchpad.net/~pitti/+jun … sion/files
i don't have any skills in bash, but looking at /gdm/guest-session-setup.sh it looks like andre.ramaciotti's approach.
taking a look at other (doc) files, i noticed it would actually work if an existing user is already running a session. not exactly what i thought...


what goes up must come down

Offline

Board footer

Powered by FluxBB