Mac Thread, Create Default OS X home dir via AD in Technical; Our Macs (10.5) are bound to an AD Server (2003) and OS X Server (10.5).
All the home folders are ...
11th June 2008, 12:36 PM #1
- Rep Power
Create Default OS X home dir via AD
Our Macs (10.5) are bound to an AD Server (2003) and OS X Server (10.5).
All the home folders are stored on the AD.
When a user logs into a Mac the default mac folders aren't created. Is there a way to create or push these folders out, similar to how it would work if the home folders were stored on the OS X Server?
11th June 2008, 03:46 PM #2
we use a program called ihook to run login scripts at login with a fancey UI with a progress bar. just set scriptname.ihook to run at login and hey presto.
Research Systems Unix Group: iHook
following code is to give you an idea of 1 of our old login scripts. fairly simple stuff.
note the very useful line to clear printing from previous users incase the printer was out of paper or there was a problem with printing when the last user tried printing etc etc!!! (cancel -a)
aim of this was to redirect a few network items to local tmp folder to stop the network drivers being hammered by cache files oh and block users own widget folder to stop them installing widgets.
cant remember if i put the sleeps in because of error or i put them in there for my sanity so that i could see the script executing. This is a fairly my old version of the scripts we run so might be some errors or old ways of doing things :P
echo %UIMODE AUTOCRATIC
echo %BACKGROUND /path/to/background.png
echo ' PLEASE WAIT.'
chmod 777 ~/library/Widgets/
rm -r ~/library/Widgets/
chmod 000 ~/library/Widgets/
# echo 'setting cache redirect to local drive'
echo ' PLEASE WAIT..'
rm -R /tmp/$CONSOLE_USER
chown $CONSOLE_USER /tmp/$CONSOLE_USER
chmod 700 /tmp/$CONSOLE_USER
echo ' PLEASE WAIT...'
# echo 'Removing Cache Folder from users home folder...'
rm -R ~/Library/Caches
echo ' PLEASE WAIT....'
# echo 'Creating alias....'
ln -s /tmp/$CONSOLE_USER ~/Library/Caches
ln -s /tmp/$CONSOLE_USER ~/Library/fonts
echo ' PLEASE WAIT......'
# echo 'SETTING CLICKVIEW REDIRECT'
rm -R ~/Documents/ClickView/SchoolBag
rm -R ~/Documents/ClickView/CoverImages
rm -R ~/Documents/ClickView/Files
rm -R ~/Documents/ClickView/DataFiles
rm -R /tmp/clickview/SchoolBag
rm -R /tmp/clickview/Files
rm -R /tmp/clickview/CoverImages
rm -R /tmp/clickview/DataFiles
echo ' PLEASE WAIT.......'
echo ' PLEASE WAIT........'
ln -s /tmp/clickview/SchoolBag ~/Documents/ClickView/SchoolBag
ln -s /tmp/clickview/Files ~/Documents/ClickView/Files
ln -s /tmp/clickview/CoverImages ~/Documents/ClickView/CoverImages
ln -s /tmp/clickview/DataFiles ~/Documents/ClickView/DataFiles
echo ' PLEASE WAIT.........'
# echo 'Changing temp tmp privs'
chmod 777 /private/tmp
echo ' PLEASE WAIT..........'
# echo 'Changing temp clickview privs'
chmod -R 777 /private/tmp/clickview
echo ' PLEASE WAIT...........'
# echo 'Changing temp clickview ownership'
chown -R $CONSOLE_USER /private/tmp/clickview
echo Hi $CONSOLE_USER Printing has been Cleared - Login Complete!
echo %UIMODE NORMAL
also not sure what will and what wont work in these scripts when storing files on smb
Disclaimer: you run these at your own risk!
Last edited by gaz350; 11th June 2008 at 03:58 PM.
12th June 2008, 09:26 AM #3
- Rep Power
Thanks for the tip.
iHook looks like it could be a life save.
By originofsymmetry in forum Scripts
Last Post: 2nd May 2008, 05:13 PM
By darknova in forum Windows Server 2008
Last Post: 13th March 2008, 04:57 PM
By link470 in forum Windows
Last Post: 19th December 2007, 10:36 AM
By thom in forum Educational Software
Last Post: 19th September 2006, 11:14 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)