atfnet Posted September 12, 2007 Posted September 12, 2007 Do Mac logon scripts run with root privileges or do then run as root? The reason I am asking is I have managed to write a script that will map a student home directory but it depends on the users id. Obviously mapping the id root will cause problems #!/bin/bash SERVER="CV0itsr003" SHARE="STUDENTDOCUMENTS\$" str="`id -u -n`" IDENT=${str%@*} echo $IDENT rm -d /Volumes/$IDENT mkdir /Volumes/$IDENT umount /Volumes/$IDENT mount -t cifs //$SERVER/$SHARE /Volumes/$IDENT ln -s /Volumes/$IDENT/$IDENT /Domain/cvs.lan/users/$IDENT/Desktop/MYDOCS Thanks Andy
gaz350 Posted September 12, 2007 Posted September 12, 2007 they run as root. if you are having problems start writing each line to a log file so you can see what its actually doing. check some scripts on macenterprise.org
bgarston Posted September 12, 2007 Posted September 12, 2007 Do Mac logon scripts run with root privileges or do then run as root? The reason I am asking is I have managed to write a script that will map a student home directory but it depends on the users id. Obviously mapping the id root will cause problems #!/bin/bash SERVER="CV0itsr003" SHARE="STUDENTDOCUMENTS\$" str="`id -u -n`" IDENT=${str%@*} echo $IDENT rm -d /Volumes/$IDENT mkdir /Volumes/$IDENT umount /Volumes/$IDENT mount -t cifs //$SERVER/$SHARE /Volumes/$IDENT ln -s /Volumes/$IDENT/$IDENT /Domain/cvs.lan/users/$IDENT/Desktop/MYDOCS Thanks Andy More work after hours Andy?? Bugger I've been caught "working" after hours too!! ;-) Cheers Ben
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now