Command files to set up a Windows 2000 Server

D

daprole

Sorry for the post while I am still reading the xxx manuals. But I
will be in charge soon and now need to learn how to set up one system
fast.

TWO PARTS:

I teach in a large high school with 15 servers.

The workstations in this room have Win2K (we are eventually upgrading
to XP).

Right now, I am merely trying to set up logins with home directories
using batch files.

I successfully created each user (from an excel spreadsheet into a
simple batch file).

Each user logins into a home share as a Z drive on the server.

I am not running a login script.

I made a folder for each user. Using md .

I want to share them so that the particular student (for instance
nadela_getgc6) can login and to the folder nadela_getgc6 and so can a
domain administrator or member of the teachers group. Obviously I
therefore want to remove everyone from share permissions completely.

I tried rmtshare (hopefully I downloaded the correct one?)

rmtshare \\SERVER\nadela_getgc6=c:\users\2004\nadela_getgc6 /grant
nadela_getgc6:f

I tried running net share but couldn't figure out how to not allow
everyone access.

If I manually share throw the gui everything works fine.

Unfortunately I don't have time to learn a new scripting language now
and would like to do everything throw the gui.

PART TWO:
I added the computers through a command line batch file.

Is there anyway to add each individual computer without going around
to each computer?

Also, when I first add the computer it tells me network path not
found. If add the server IP manually as the DNS, it will work. I
don't control the DHCP server, so can't add it as one of the DNS given
out over the DHCP.

Thanks.
 
M

Marty List

daprole said:
Sorry for the post while I am still reading the xxx manuals. But I
will be in charge soon and now need to learn how to set up one system
fast.

TWO PARTS:

I teach in a large high school with 15 servers.

The workstations in this room have Win2K (we are eventually upgrading
to XP).

Right now, I am merely trying to set up logins with home directories
using batch files.

I successfully created each user (from an excel spreadsheet into a
simple batch file).

Each user logins into a home share as a Z drive on the server.

I am not running a login script.

I made a folder for each user. Using md .

I want to share them so that the particular student (for instance
nadela_getgc6) can login and to the folder nadela_getgc6 and so can a
domain administrator or member of the teachers group. Obviously I
therefore want to remove everyone from share permissions completely.

I tried rmtshare (hopefully I downloaded the correct one?)

rmtshare \\SERVER\nadela_getgc6=c:\users\2004\nadela_getgc6 /grant
nadela_getgc6:f

I tried running net share but couldn't figure out how to not allow
everyone access.

If I manually share throw the gui everything works fine.

Unfortunately I don't have time to learn a new scripting language now
and would like to do everything throw the gui.

PART TWO:
I added the computers through a command line batch file.

Is there anyway to add each individual computer without going around
to each computer?

Also, when I first add the computer it tells me network path not
found. If add the server IP manually as the DNS, it will work. I
don't control the DHCP server, so can't add it as one of the DNS given
out over the DHCP.

Thanks.


For part 1, you never said what's not working. Does rmtshare.exe succeed or
give you an error? Does the user get an error when accessing the share?
Also, you said if you "manually share through the gui everything works fine"
but then you said you "would like to do everything through the gui".

Is "nadela" actually part of the user account name, or is that the name of
the domain? If that's the domain name then the user account would be
"nadela\getgc6".

Try something like this:

rmtshare.exe \\SERVER\nadela_getgc6=c:\users\2004\nadela_getgc6 /grant
"DOMAIN\nadela_getgc6:f" /grant "DOMAIN\Domain Admins:f" /grant
"DOMAIN\teachersgroup:f"
 
D

daprole

For part 1, you never said what's not working. Does rmtshare.exe succeed or
give you an error? Does the user get an error when accessing the share?
Also, you said if you "manually share through the gui everything works fine"
but then you said you "would like to do everything through the gui".

Is "nadela" actually part of the user account name, or is that the name of
the domain? If that's the domain name then the user account would be
"nadela\getgc6".

Try something like this:

rmtshare.exe \\SERVER\nadela_getgc6=c:\users\2004\nadela_getgc6 /grant
"DOMAIN\nadela_getgc6:f" /grant "DOMAIN\Domain Admins:f" /grant
"DOMAIN\teachersgroup:f"


This is the script I got to partially work today:
dave999 is the user and dave9991 is the password
I ran it it in the 03_04share directory on the f: drive.




md dave999
net user dave999 dave9991 /add /homedir:f:\03_04share\dave999
REM net share dave999=f:\03_04share\dave999
rmtshare \\bt-1n4-servback\dave999=f:\03_04share\dave999 /grant
78k4301n4\dave999:f

It doesn't give the user the correct home directory when he logs on.

If I try to added the second /grant as in Marty's illustration, I get
an error.

Thanks.
 
M

Marty List

daprole said:
This is the script I got to partially work today:
dave999 is the user and dave9991 is the password
I ran it it in the 03_04share directory on the f: drive.



md dave999
net user dave999 dave9991 /add /homedir:f:\03_04share\dave999
REM net share dave999=f:\03_04share\dave999
rmtshare \\bt-1n4-servback\dave999=f:\03_04share\dave999 /grant
78k4301n4\dave999:f

It doesn't give the user the correct home directory when he logs on.

If I try to added the second /grant as in Marty's illustration, I get
an error.

Thanks.


Be more specific in your posts. When you say "It doesn't give the user the
correct home directory when he logs on" you should also tell us what the
user is getting for the home directory. Instead of saying "I get an error"
you should tell us what the error is.

Unless your users are logging on at the keyboard of the server, I think your
'net user' command should look like this:
net user dave999 dave9991 /add /homedir:\\bt-1n4-servback\dave999


And if these are domain accounts then you should add the /DOMAIN switch like
this:
net user dave999 dave9991 /add /homedir:\\bt-1n4-servback\dave999 /DOMAIN


On the rmtshare.exe command, I abbreviated the permissions when they need to
be spelled out. Sorry about that, try something like this:
rmtshare \\bt-1n4-servback\dave999=f:\03_04share\dave999 /grant
"78k4301n4\dave999":"Full Control" /grant "78k4301n4\Domain Admins":"Full
Control" /grant "78k4301n4\Teachers Group":"Full Control"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top