August 8, 2006 - shell scripts
I’ve written the various scripts on this page for my own use. Feel free to download, modify and redistribute them if you wish. However, they are provided without and guarantee that they’ll work for you and not screw up your system beyond all recognition.
Suggestions and improvements for these scripts are welcome to the e-mail address above.
Scripts that are still maintained can now be found in my darcs repository.
A bash shell script to set up home directories on a Samba 3 Member server for user accounts extracted from an NT4 PDC. Other shell commands required and other comments are all in the head of the file. Please read all the information contained in the header carefully before using the script.
A bash shell script to copy user data from a remote SMB server to a Samba 3 server. The directories must have already been set up, for example by using add_domain_users above. Other shell commands required and other comments are all in the head of the file. Please read all the information contained in the header carefully before using the script.
A bash shell script to log the size of shares related to user accounts in an NT4 Domain. This script is designed to be used where each user has a share that is related to their username on a particular server. The output can then be parsed to produce CSV output. Other shell commands required and other comments are all in the head of the file. Please read all the information contained in the header carefully before using the script.
A bash shell script designed to be run as the root pre-exec setting in smb.conf. It checks if a user’s home directory exists when they connect to the server. If the directory does not exist, the script sets it up with appropriate permissions and quota.
A bash shell script to check whether an internet connection is up. It is designed to use commands found on an IPCop installation and to be run from cron (fcron on IPCop 1.4.0). Users should enter four IP addresses of their choice in the top of the script.
A bash shell script to run a virus scan and e-mail the results to someone who cares. Uses standard programs but requires at least a local MTA.
A bash shell script to call Suspend-to-disk on the IBM ThinkPad R40. The script includes a tweak that stops tpb (the ThinkPad buttons program) from causing multiple suspends when the Suspend-to-disk function is called using the “Access IBM” button.

