+ Post New Thread
Results 1 to 6 of 6
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 ...
  1. #1
    WithoutMotive's Avatar
    Join Date
    Feb 2006
    Location
    Wigan, UK
    Posts
    628
    Thank Post
    41
    Thanked 47 Times in 41 Posts
    Rep Power
    27

    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.

  2. #2

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,067
    Thank Post
    209
    Thanked 430 Times in 310 Posts
    Rep Power
    144
    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.

  3. #3
    kestrel1's Avatar
    Join Date
    Jul 2005
    Location
    New Forest
    Posts
    294
    Thank Post
    3
    Thanked 11 Times in 11 Posts
    Rep Power
    20
    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.

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by maniac View Post
    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.

  5. #5


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    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.

  6. #6
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,342
    Thank Post
    670
    Thanked 169 Times in 154 Posts
    Blog Entries
    78
    Rep Power
    85
    Google Active User Manager. It'll do this, and track the folder paths for you. Works on Server 08 too.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 3
    Last Post: 30th July 2009, 12:37 PM
  2. standard users adding Printers
    By k-strider in forum Windows 7
    Replies: 4
    Last Post: 14th July 2009, 12:29 PM
  3. Adding new users
    By Little-Miss in forum Network and Classroom Management
    Replies: 1
    Last Post: 12th September 2008, 10:56 AM
  4. Adding users...
    By rich0d in forum Scripts
    Replies: 2
    Last Post: 11th October 2007, 09:15 PM
  5. Slight problem with NT machines network
    By Pear in forum Windows
    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
  •