How do you do....it? Thread, Adding New Users - slight problem this year in Technical; Hi gang,
The past few years I've had a lovely little script which adds my new users from a CSV ...
-
12th August 2009, 10:35 AM #1 Adding New Users - slight problem this year
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.
-
-
IDG Tech News
-
12th August 2009, 11:26 AM #2 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.
-
-
12th August 2009, 11:31 AM #3 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.
-
-
12th August 2009, 11:31 AM #4 
Originally Posted by
maniac
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.
-
-
12th August 2009, 11:37 AM #5 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 !
Code:
#!/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
Last edited by CyberNerd; 12th August 2009 at 01:54 PM.
-
-
12th August 2009, 11:37 AM #6 Google Active User Manager. It'll do this, and track the folder paths for you. Works on Server 08 too.
-
SHARE: 
Similar Threads
-
By AlexPilot in forum Mac
Replies: 3
Last Post: 30th July 2009, 12:37 PM
-
By k-strider in forum Windows 7
Replies: 4
Last Post: 14th July 2009, 12:29 PM
-
By Little-Miss in forum Network and Classroom Management
Replies: 1
Last Post: 12th September 2008, 10:56 AM
-
By rich0d in forum Scripts
Replies: 2
Last Post: 11th October 2007, 09:15 PM
-
Replies: 2
Last Post: 3rd November 2005, 05:02 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules