Auto Customizing Linux Desktops For Enterprise Deployment

Auto Customizing Linux Desktops For Enterprise Deployment

I'm deploying 6 more Linux workstations on my network (8.04 LTS) and decided it would be much easier if I could just run one script on each workstation that would install the additional packages I needed for LDAP authentication, configure PAM and nsswitch.conf automatically and standardize the user's desktop environment with a Firefox icon on the desktop and the Firefox homepage to our Intranet workflow system.

There's probably better ways to do this, but a simple script did it for me. First, I configured one workstation, logged in as a new user and configured their Firefox and desktop the way I wanted.

Next, as root I created a working directory called "add2network" and copied the following into it:

mkdir /root/add2network
cd /root/add2network
cp /etc/nsswitch.conf ./
cp /etc/ldap.conf ./
cp /etc/ldap.secret ./
mkdir pam.d
cp /etc/pam.d/common* ./pam.d/
cp /home/user/Desktop ./
cp -R /home/user/.mozilla ./

Next, I created a new script called "" in the working directory and inserted the following commands into it:

apt-get install libpam-ldap libnss-ldap nss-updatedb libnss-db
rm -R /etc/skel/*
cp ./nsswitch.conf /etc/
cp ./pam.d/* /etc/pam.d/
cp ./ldap.* /etc/
chmod 600 /etc/ldap.secret
cp -R ./Desktop /etc/skel/
cp -R ./mozilla /etc/skel/

Next, do the following to make the script executable:

chmod +x
Then, I tar'd this up and uploaded it to my Intranet web server so I could easily download it from anywhere. I just untar the archive, cd into the add2network directory and run the script. After running this script on a new Ubuntu 8.04 workstation, it will be configured for LDAP authentication, and any new users will automatically get the login skeleton structure I've created. This last bit assumes that in the /etc/pam.d/common-account file I install that I have:
session skel=/etc/skel/ umask=0022

And there you have it - semi-automated Linux workstation setup for enterprise deployment.

Posted by Tony on Feb 18, 2009 |