WithoutMotive Posted August 12, 2009 Posted August 12, 2009 Hi gang, The past few years I've had a lovely little script which adds my new users from a CSV files, sets their home folder share, permissions, etc. using RMTSHARE and XCACLS. Worked lovely... until this year. This year is different as we have our DC and a separate file server where the home folders are stored. Created users - fine. Created folders on file server - fine. Created security permissions on folders - fine. Created home home folder shares - ah... RMTSHARE doesn't allow UNC paths so, I'm now a bit stuck. My lovely script, as run from the DC, creates the users, remotely creates the folders on the files server and remotely sets their permissions but won't share the buggers. I WOULD run the script from the file server but it isn't a backup DC. Any suggestions? Ta.
maniac Posted August 12, 2009 Posted August 12, 2009 I don't share users folders individually, I have one root share which all students can read, and all the users home folders as sub directories of this. Their home folder is mapped to their sub directory \\SERVER\SHARE\USERNAME The only flaw with this is there's always a few bright sparks that ocassionally find themselves in the root share, but the security permissions stop users getting into each others folders, so they can't do any harm. The best bit about doing it this way is Active directory itself will create the home folders and set the security on them, even if they are on another server, so no need for fancy scripts or programs. IIRC this is actually the recommended method of doing home folder shares, and not to create an individual share for each user, as managing more individual shares uses more server resources I seem to remember reading somewhere. Mike.
kestrel1 Posted August 12, 2009 Posted August 12, 2009 When I add the users with a csv file I have a script that I run from the fileserver & not the DC. The fileserver is not a backup DC, but the users are added to Active directory with no problem.
powdarrmonkey Posted August 12, 2009 Posted August 12, 2009 I don't share users folders individually, I have one root share which all students can read, and all the users home folders as sub directories of this. Their home folder is mapped to their sub directory \\SERVER\SHARE\USERNAME The only flaw with this is there's always a few bright sparks that ocassionally find themselves in the root share, but the security permissions stop users getting into each others folders, so they can't do any harm. The best bit about doing it this way is Active directory itself will create the home folders and set the security on them, even if they are on another server, so no need for fancy scripts or programs. IIRC this is actually the recommended method of doing home folder shares, and not to create an individual share for each user, as managing more individual shares uses more server resources I seem to remember reading somewhere. Ack. This is exactly what I do, it's just simpler.
CyberNerd Posted August 12, 2009 Posted August 12, 2009 (edited) We do this differently. We have a samba server that holds all the student shares. As soon as a new user logs on, samba automatically creates the home directory, sets the permissions and creates the quota. Much simpler ! #!/bin/bash if ["$2" = "09" -o "$2" = "08" -o "$2" = "07" -o "$2" = "06" -o "$2" = "05" -o "$2" = "04" -o "$2" = "03" -o "$2" = "02" -o "$2" = "adulted" -o "$2" = "exams" -o "$2" = "gueststudents" ] ; then if [ ! -e /home/CURRIC/$2/$1 ]; then mkdir -p /home/CURRIC/$2/$1 chown $1:"domain admins" /home/CURRIC/$2/$1 chmod o-rwx /home/CURRIC/$2/$1 chmod g+rwxs /home/CURRIC/$2/$1 setfacl -m user:$1:rwx /home/CURRIC/$2/$1 setfacl -m group:teachers:r-x /home/CURRIC/$2/$1 setfacl -m group:"domain admins":rwx /home/CURRIC/$2/$1 if [ "$2" = "03" -o "$2" = "04" ]; then setquota -u $1 1048576 1228800 0 0 /home/CURRIC/ elif [ "$2" = "08" ]; then setquota -u $1 614400 716800 0 0 /home/CURRIC/ elif [ "$2" = "07" ]; then setquota -u $1 614400 716800 0 0 /home/CURRIC/ elif [ "$2" = "06" ]; then setquota -u $1 614400 716800 0 0 /home/CURRIC/ elif [ "$2" = "05" ]; then setquota -u $1 614400 716800 0 0 /home/CURRIC/ elif [ "$2" = "09" ]; then setquota -u $1 614400 716800 0 0 /home/CURRIC/ elif [ "$2" = "adulted" ]; then setquota -u $1 614400 716800 0 0 /home/CURRIC/ else setquota -u $1 614400 716800 0 0 /home/CURRIC/ fi fi fi exit 0 Edited August 12, 2009 by CyberNerd
TheScarfedOne Posted August 12, 2009 Posted August 12, 2009 Google Active User Manager. It'll do this, and track the folder paths for you. Works on Server 08 too.
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