[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Lockdown of users



On Friday 01 Oct 2004 3:37 am, norbert wrote:
> Hi,
>
> If when I create new users and their default profile is taken from
> /etc/skel/ could I make custom entries in /etc/skel/ and chown all the
> files to "admin" or "root" to prevent the little monsters from modifiing
> their desktop, specifically removing icon and launch bar ?

Files in /etc/skel are owned by root; the useradd process copies them to the 
new users home dir and chown's the copied files.  While you could change the 
ownership in the user's home dir, you'll probably find that things don't 
work, as the display manager needs to update these files.

What I've done is written a cron job that resets the wallpaer, turns off the 
screen saver, etc.  We run this overnight, but it might be possible to  
change this to run at logoff, perhaps in $HOME/.bash_logout ?  

--script fragment--
find /home -name "kdesktoprc" > /tmp/$$
for f in `cat /tmp/$$` ; do
  cp -f $f /tmp/kdesktopdc.$$
  awk -f /usr/local/bin/hgsdesktop.awk /tmp/kdesktoprc.$$ >$f
done
rm -f /tmp/$$
rm -f /tmp/kdesktoprc.$$

--awk fragment--
   if ( $0 ~ /Wallpaper=.*/ ) {
      split($0,TMP,"=")
      $0=TMP[1] "=/usr/share/backgrounds/images/default.png"
    }
    if ( $0 ~ /WallpaperMode=.*/ ) {
      split($0,TMP,"=")
      $0=TMP[1] "=Scaled"
    }
    print $0 
-- 
Regards
Martin Woolley
ICT Support
Handsworth Grammar School
Isis Astarte Diana Hecate Demeter Kali Inanna



*************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this email 
in error please notify postmaster bgfl org

The views expressed within this email are those of the 
individual, and not necessarily those of the organisation
*************************************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]