Linux Login Scripts for Client access to Network servers

Valid HTML 4.01!


This page is out of date

please see http://www.rainsbrook.co.uk/wiki/doku.php?id=rb:linuxloginscripts.

Background

This is a development of the original Novell login script, (see here for original scripts) but now allows logins to cifs, linux/unix over ssh and novell servers. NFS is not supported but may be added later.

Details

There are two scripts, login.sh and logout.sh with an associated config file, login.cfg. These scripts are designed to be located on the client system at present, maybe in future the config script could be located on a netlogin share or http server and fetched with wget.
Some icon samples are included, these need to be copied to the systems icon repository. This will require root access for install, but currently there are some permissions which need to be changed on mount.cifs which require root access anyway.
Currently, these are shell commands, not GUI ones with the exception of the password.sh script. This uses Zenity to give gui logins. The password changing script has not been extensively tested and is probably broken. It was written somewhat as a test for zenity.
A desktop icon is generated for each sucessful login, this shows the icon listed below and allows a user to open up the mount point in a gui file manager such as Konqueror or Dolphin. Shell access is of course available.
As these are still development, they can be run with a debug option which provides a verbose dialog of what is being done.

Icons


There are no alternative icons for Gnome users or other KDE themes. This should be addressed but is not a high priority.

Files

login.sh
login.cfg
logout.sh
password.sh


Testing

The current development work is being done on Fedora 12 using KDE4 and GNOME with some testing on Fedora 8 for KDE3 compatability.
Some work is being done to support Mac OS X, this is not a priority. In principle I'd like this to work on as many *NIX based systems as possible.

Problems

The windows login part is handled by mount.cifs (used to be the smbfs command which is now superceeded by cifs). On Fedora 12, samba's mount.cifs has been broken by design to stop it running suid. This stops users from running login scripts, but works as root.
Fix suggested at:- http://fedoraforum.org/forum/showthread.php?p=1325076
This page is also helpful:- http://smb4k.berlios.de/handbook/trouble_shooting_mounting_unmounting.html which suggests downgrading the samba client utilities. This worked for me, but may go wrong again after any updates.
yum downgrade samba-winbind-clients samba-common samba-client libsmbclient
After downgrading, you will need to set the setuid bit to allow a user to run mount.cifs as root:-
[root@thinkcentre1 ~]# chmod +s `which mount.cifs`
[root@thinkcentre1 ~]# chmod +s `which umount.cifs`

Bugs

  1. Need to work out which desktop manager is in use. KDE 4 uses plasmoids to display desktop icons, KDE 3 used files in $USER/Desktop. Gnome still seems to use $USER/Desktop. Consequently, desktop icons are not displayed in KDE4. I am still unsure how to generate a plasmoid on the fly.
  2. The same applies to running this under OSX, I need to create an icon on the fly.
  3. Work out NFS mounting.

Current Status

Due to a change in job, work has slowed on this project due to being forced to use win7 to admin Linux. What a crazy way to do things, I used to suspect vistula and w7 were shit, after having to use w7, I now know it is *really* shit.
Next step will be to try and add LDAP access rather than use local accounts, OpenLDAP will be the first target since I have it running, but it would be nice to try with MAD and maybe Novell's NDS.

Feature Request

None Yet

Links

Sorting out mount.cifs
http://share-it.gatech.edu/campus/departments/physics/operations-manual/linux/mounting-a-windows-share-to-linux-as-a-non-root #

Contact

electronicmail:- loginscripts -at- domainname of website. --- Last updated 08/02/2011.