Map a drive once for all users?

  • Thread starter Thread starter News
  • Start date Start date
N

News

There is a folder of data on my domain server that I would like to map as a
drive g:\ for every user in the company. Is there a way to do this once for
everyone instead of going logging in user by user?
 
Use a logon script. Isn't that how you're currently managing drive
mappings? If not, how are you managing them?

Ray at work
 
Its all new to me. Learning as I go...

In a peer-to-peer workgroup I would browse to the drive in network
neighbourhood and select map network drive and click reconnect.

I will now look in my books for "logon script" and begin to educate myself
thanks to your direction.

Thanks again.
 
Login scripts are used in a domain environment. You said you have "domain
server" so I assume you're in a domain. Your domain controller should have
a NETLOGON share. Logon scripts go in there. For example:

logon.bat:
net use g: \\server\share /p:n


Then, in AD users and computers, you'd set the user's logon script to be
"logon.bat"

Ray at work
 
Excelent now I am getting it. Just a couple more questions...

1. What is the "/p:n" doing in your bat file?
2. I assume I can put multiple lines in this logon.bat for many drives. For
example...
net use g: \\server\share /p:n
net use t: \\server\bv /p:n
net use z: \\server\goldmine /p:n
3. I don't think I can I share \\server can I? I know wouldnt be a good idea
even if you can but I was wondering if I can. I used to map an entire drive
of another computer in peer-to-peer.
 
News said:
Excelent now I am getting it. Just a couple more questions...

1. What is the "/p:n" doing in your bat file?

/p:n is the same is /persistent:no
What that means, is "Should this connection be automatically reconnected the
next time the user logs on?" I, personally, use /p:n for logon scripts,
because if the logon script will map the drive every day. If the person's
logon script doesn't run, that means there's some other issue, and I don't
want him to have his drives. Also, if there are a bunch of remembered
connections for users, they're a pain to get rid of when someone else
changes login scripts for everyone. To be a little more thorough, you may
want to delete any existing mapping first too, for good measure:

NET USE G: /DELETE
REM or net use g: /d

NET USE G: \\SERVER\SHARE /PERSISTENT:NO
REM or net use g: \\server\share /p:n



2. I assume I can put multiple lines in this logon.bat for many drives. For
example...
net use g: \\server\share /p:n
net use t: \\server\bv /p:n
net use z: \\server\goldmine /p:n

Yes, absolutely. :]

3. I don't think I can I share \\server can I?

No, you have to have a server name and a share name. You can map to
subdirectories in shares as well if the client machine is W2K or higher.



I know wouldnt be a good idea
even if you can but I was wondering if I can. I used to map an entire drive
of another computer in peer-to-peer.

Simplest thing to do would be to use the default share on each drive, i.e.
\\server\c$, \\server\d$, or probably to be a little more
security-conscious, create a second share on the drive if you want to share
the whole thing and then use \\server\CDrive or something.

Ray at work
 
News said:
Excelent now I am getting it. Just a couple more questions...

1. What is the "/p:n" doing in your bat file?

See the persistent switch below:

C:\>net use /?
The syntax of this command is:

NET USE [devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]

2. I assume I can put multiple lines in this logon.bat for many drives. For
example...
net use g: \\server\share /p:n
net use t: \\server\bv /p:n
net use z: \\server\goldmine /p:n
Yes.


3. I don't think I can I share \\server can I?

No.
 

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

Back
Top