|
tech
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Mapped Network Drives on login for Specific Users OnlyI'm fairly new to Windows Server 2003. At present, I have setup a script so that all users will have various network drives mapped when they login. The script lives in: C:\WINDOWS\SYSVOL\sysvol\nyoffice.local\scripts\login.bat The contents of login.bat are as follows: net use t: \\server\transfers net use z: \\server\city net use k: \\server\PIM4US In addition to what this script currently does, I would also like it so that for a few specific users, they get an additional network drive on login. Can someone show me how to do this? Many thanks! Stanbridge
Show quote
Hide quote
"Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message There are several ways of doing this. Here is one way:news:36375F45-1FEE-4654-996B-2624808BA50C@microsoft.com... > Hi all, > > I'm fairly new to Windows Server 2003. At present, I have setup a script > so > that all users will have various network drives mapped when they login. > The > script lives in: > C:\WINDOWS\SYSVOL\sysvol\nyoffice.local\scripts\login.bat > > The contents of login.bat are as follows: > net use t: \\server\transfers > net use z: \\server\city > net use k: \\server\PIM4US > > In addition to what this script currently does, I would also like it so > that > for a few specific users, they get an additional network drive on login. > > Can someone show me how to do this? > > Many thanks! > > > Stanbridge Presumably your users have a personal share called \\server\%UserName%. If so then you can create a hidden folder \\server\%UserName%\netlogon. Into that folder you can place the batch file netlogin.bat, but only if you wish. It would contain personal network mappings. Your master netlogin batch file must look like this: net use t: \\server\transfers net use z: \\server\city net use k: \\server\PIM4US if exist \\server\%UserName%\netlogon\netlogin.bat call \\server\%UserName%\netlogon\netlogin.bat Hi Pegasus,
Thanks for the speedy reply! Unfortunately the users do not have their own shared folders on the Server. The drives that you see mapped in Login.bat below are just shared folders on the server's root directory (C:\). Is there somewhere special I would need to setup shared folders for each user (each with a netlogon folder as below)? If so, how do I name these folders? Or rather, how will Windows know which folder belongs to which user? Otherwise, is there a way I can setup a Group in "Active Directory Users and Computers" and then somehow assign a specific login.bat or netlogin.bat to that? Apologies for the obvious newbieness! Thanks again mate! Stanbridge Show quoteHide quote "Pegasus (MVP)" wrote: > > "Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message > news:36375F45-1FEE-4654-996B-2624808BA50C@microsoft.com... > > Hi all, > > > > I'm fairly new to Windows Server 2003. At present, I have setup a script > > so > > that all users will have various network drives mapped when they login. > > The > > script lives in: > > C:\WINDOWS\SYSVOL\sysvol\nyoffice.local\scripts\login.bat > > > > The contents of login.bat are as follows: > > net use t: \\server\transfers > > net use z: \\server\city > > net use k: \\server\PIM4US > > > > In addition to what this script currently does, I would also like it so > > that > > for a few specific users, they get an additional network drive on login. > > > > Can someone show me how to do this? > > > > Many thanks! > > > > > > Stanbridge > > There are several ways of doing this. Here is one way: > Presumably your users have a personal share called \\server\%UserName%. If > so then you can create a hidden folder \\server\%UserName%\netlogon. Into > that folder you can place the batch file netlogin.bat, but only if you wish. > It would contain personal network mappings. Your master netlogin batch file > must look like this: > net use t: \\server\transfers > net use z: \\server\city > net use k: \\server\PIM4US > if exist \\server\%UserName%\netlogon\netlogin.bat call > \\server\%UserName%\netlogon\netlogin.bat > > > Sooner or later you will have to create personal shares for your users. They
will demand it . . . The principle I used can be equally applied by creating a common share to which all users have access. Let's call it "Common". Your master login batch file would now look like so: net use t: \\server\transfers net use z: \\server\city net use k: \\server\PIM4US if exist \\server\Common\%UserName%.bat call \\server\Common\%UserName%.bat Again I would hide the various batch files. I would also make the Common share read-only. Show quoteHide quote "Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message news:3C17084A-41D5-4808-A5FF-70855CF3C360@microsoft.com... > Hi Pegasus, > > Thanks for the speedy reply! Unfortunately the users do not have their > own > shared folders on the Server. The drives that you see mapped in Login.bat > below are just shared folders on the server's root directory (C:\). > > Is there somewhere special I would need to setup shared folders for each > user (each with a netlogon folder as below)? If so, how do I name these > folders? Or rather, how will Windows know which folder belongs to which > user? > > Otherwise, is there a way I can setup a Group in "Active Directory Users > and > Computers" and then somehow assign a specific login.bat or netlogin.bat to > that? > > Apologies for the obvious newbieness! Thanks again mate! > > > Stanbridge > > > "Pegasus (MVP)" wrote: > >> >> "Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message >> news:36375F45-1FEE-4654-996B-2624808BA50C@microsoft.com... >> > Hi all, >> > >> > I'm fairly new to Windows Server 2003. At present, I have setup a >> > script >> > so >> > that all users will have various network drives mapped when they login. >> > The >> > script lives in: >> > C:\WINDOWS\SYSVOL\sysvol\nyoffice.local\scripts\login.bat >> > >> > The contents of login.bat are as follows: >> > net use t: \\server\transfers >> > net use z: \\server\city >> > net use k: \\server\PIM4US >> > >> > In addition to what this script currently does, I would also like it so >> > that >> > for a few specific users, they get an additional network drive on >> > login. >> > >> > Can someone show me how to do this? >> > >> > Many thanks! >> > >> > >> > Stanbridge >> >> There are several ways of doing this. Here is one way: >> Presumably your users have a personal share called \\server\%UserName%. >> If >> so then you can create a hidden folder \\server\%UserName%\netlogon. Into >> that folder you can place the batch file netlogin.bat, but only if you >> wish. >> It would contain personal network mappings. Your master netlogin batch >> file >> must look like this: >> net use t: \\server\transfers >> net use z: \\server\city >> net use k: \\server\PIM4US >> if exist \\server\%UserName%\netlogon\netlogin.bat call >> \\server\%UserName%\netlogon\netlogin.bat >> >> >> Cool. So just to confirm, by naming the .bat login script file after the
user's login name (the username they type to log into Windows) Windows will know to activate this script for that particular user on login? Or using your other method with personal shares, naming the %UserName% folder in \\server\%UserName%\netlogon\netlogin.bat after the user's window login - Windows will be able to match the foldername with the user here too? Cheers Show quoteHide quote "Pegasus (MVP)" wrote: > Sooner or later you will have to create personal shares for your users. They > will demand it . . . > > The principle I used can be equally applied by creating a common share to > which all users have access. Let's call it "Common". Your master login batch > file would now look like so: > net use t: \\server\transfers > net use z: \\server\city > net use k: \\server\PIM4US > if exist \\server\Common\%UserName%.bat call \\server\Common\%UserName%.bat > > Again I would hide the various batch files. I would also make the Common > share read-only. > > Hi again!
I tried the following without any luck. In this example, the I tested with staffer windows login "bwood" (minus the double-quotes). 1) On the \\server I created shared (full access to everyone) folder named "salesteam". This will be the folder that only the few individual users need access to. 1) On the \\server I created a folder named "bwood". This is the folder for the first user's login script. If this works I would also setup folders of the same nature containing the special login script for the other few users. 2) In this folder I created a folder called "netlogon". 3) In this folder I created a file called netlogin.bat. 4) In netlogin.bat I added "net use m: \\server\mynewshare" 5) In my master login batch file (\\server\netlogon) I updated the login.bat script to appear as follows: net use t: \\server\transfers net use z: \\server\city net use k: \\server\PIM4US if exist \\server\bwood\netlogon\netlogin.bat call \\server\bwood\netlogon\netlogin.bat When I log out of the server and log into bwood's PC I don't see the new drive. I also tried actually adding % symbols to either side of the bwood folder and in the script. This didn't work either. Could it be something to do with the bwood subfolder being named "netlogon" and the script being named "netlogin.bat" (filenames for the folder and script therein don't match). Can you see what I might have done wrong? Any help is much appreciated! Thanks again! Stanbridge Show quoteHide quote "Pegasus (MVP)" wrote: > Sooner or later you will have to create personal shares for your users. They > will demand it . . . > > The principle I used can be equally applied by creating a common share to > which all users have access. Let's call it "Common". Your master login batch > file would now look like so: > net use t: \\server\transfers > net use z: \\server\city > net use k: \\server\PIM4US > if exist \\server\Common\%UserName%.bat call \\server\Common\%UserName%.bat > > Again I would hide the various batch files. I would also make the Common > share read-only. There appears to be some confusion about folders and shares. You tend to use
the terms interchangeably - yet they are completely different things. You write, for example: On the \\server I created a folder named "bwood". and also: if exist \\server\bwood\netlogon\netlogin.bat call but you never write anything about creating a "share" called "bwood". To create a share, two things are necessary: 1. You must have a folder to which the share points. On your server its perhaps something like d:\shares\bwood. 2. You must create a share that points to this folder. There are several ways of doing it. Here is a Console command: net share bwood=d:\shares\bwood{Enter} Testing your concept by logging on and waiting for the login script to do the right thing is wasteful. It would be much faster to open a Command Prompt on one of the workstations and type a few commands, e.g. like so: dir \\server\bwood{Enter} dir \\server\bwood\netlogon{Enter} type \\server\bwood\netlogon\netlogin.bat{Enter} \\server\bwood\netlogon\netlogin.bat{Enter} These commands will execute instantly and they will immediately tell you what's wrong. Show quoteHide quote "Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message news:15F9DEB3-D150-480E-9FAB-8BB1B0FFDBED@microsoft.com... > Hi again! > > I tried the following without any luck. In this example, the I tested > with > staffer windows login "bwood" (minus the double-quotes). > > 1) On the \\server I created shared (full access to everyone) folder named > "salesteam". This will be the folder that only the few individual users > need > access to. > 1) On the \\server I created a folder named "bwood". This is the folder > for > the first user's login script. If this works I would also setup folders > of > the same nature containing the special login script for the other few > users. > 2) In this folder I created a folder called "netlogon". > 3) In this folder I created a file called netlogin.bat. > 4) In netlogin.bat I added "net use m: \\server\mynewshare" > > 5) In my master login batch file (\\server\netlogon) I updated the > login.bat > script to appear as follows: > net use t: \\server\transfers > net use z: \\server\city > net use k: \\server\PIM4US > if exist \\server\bwood\netlogon\netlogin.bat call > \\server\bwood\netlogon\netlogin.bat > > When I log out of the server and log into bwood's PC I don't see the new > drive. > > I also tried actually adding % symbols to either side of the bwood folder > and in the script. This didn't work either. > > Could it be something to do with the bwood subfolder being named > "netlogon" > and the script being named "netlogin.bat" (filenames for the folder and > script therein don't match). > > Can you see what I might have done wrong? Any help is much appreciated! > > Thanks again! > > > Stanbridge > > > > "Pegasus (MVP)" wrote: > >> Sooner or later you will have to create personal shares for your users. >> They >> will demand it . . . >> >> The principle I used can be equally applied by creating a common share to >> which all users have access. Let's call it "Common". Your master login >> batch >> file would now look like so: >> net use t: \\server\transfers >> net use z: \\server\city >> net use k: \\server\PIM4US >> if exist \\server\Common\%UserName%.bat call >> \\server\Common\%UserName%.bat >> >> Again I would hide the various batch files. I would also make the Common >> share read-only. Ah yes, you're right, sorry about that!
Got it working for staffer's individual shares now. Thanks very much for all of your help Pegasus!!! Very much appreciated!!! Show quoteHide quote "Pegasus (MVP)" wrote: > There appears to be some confusion about folders and shares. You tend to use > the terms interchangeably - yet they are completely different things. You > write, for example: > On the \\server I created a folder named "bwood". > and also: > if exist \\server\bwood\netlogon\netlogin.bat call > but you never write anything about creating a "share" called "bwood". > > To create a share, two things are necessary: > 1. You must have a folder to which the share points. On your server its > perhaps something like d:\shares\bwood. > 2. You must create a share that points to this folder. There are several > ways of doing it. Here is a Console command: > net share bwood=d:\shares\bwood{Enter} > > Testing your concept by logging on and waiting for the login script to do > the right thing is wasteful. It would be much faster to open a Command > Prompt on one of the workstations and type a few commands, e.g. like so: > dir \\server\bwood{Enter} > dir \\server\bwood\netlogon{Enter} > type \\server\bwood\netlogon\netlogin.bat{Enter} > \\server\bwood\netlogon\netlogin.bat{Enter} > > These commands will execute instantly and they will immediately tell you > what's wrong. > > > "Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message > news:15F9DEB3-D150-480E-9FAB-8BB1B0FFDBED@microsoft.com... > > Hi again! > > > > I tried the following without any luck. In this example, the I tested > > with > > staffer windows login "bwood" (minus the double-quotes). > > > > 1) On the \\server I created shared (full access to everyone) folder named > > "salesteam". This will be the folder that only the few individual users > > need > > access to. > > 1) On the \\server I created a folder named "bwood". This is the folder > > for > > the first user's login script. If this works I would also setup folders > > of > > the same nature containing the special login script for the other few > > users. > > 2) In this folder I created a folder called "netlogon". > > 3) In this folder I created a file called netlogin.bat. > > 4) In netlogin.bat I added "net use m: \\server\mynewshare" > > > > 5) In my master login batch file (\\server\netlogon) I updated the > > login.bat > > script to appear as follows: > > net use t: \\server\transfers > > net use z: \\server\city > > net use k: \\server\PIM4US > > if exist \\server\bwood\netlogon\netlogin.bat call > > \\server\bwood\netlogon\netlogin.bat > > > > When I log out of the server and log into bwood's PC I don't see the new > > drive. > > > > I also tried actually adding % symbols to either side of the bwood folder > > and in the script. This didn't work either. > > > > Could it be something to do with the bwood subfolder being named > > "netlogon" > > and the script being named "netlogin.bat" (filenames for the folder and > > script therein don't match). > > > > Can you see what I might have done wrong? Any help is much appreciated! > > > > Thanks again! > > > > > > Stanbridge > > > > > > > > "Pegasus (MVP)" wrote: > > > >> Sooner or later you will have to create personal shares for your users. > >> They > >> will demand it . . . > >> > >> The principle I used can be equally applied by creating a common share to > >> which all users have access. Let's call it "Common". Your master login > >> batch > >> file would now look like so: > >> net use t: \\server\transfers > >> net use z: \\server\city > >> net use k: \\server\PIM4US > >> if exist \\server\Common\%UserName%.bat call > >> \\server\Common\%UserName%.bat > >> > >> Again I would hide the various batch files. I would also make the Common > >> share read-only. > > > Thanks for the feedback.
Show quoteHide quote "Stanbridge" <Stanbri***@discussions.microsoft.com> wrote in message news:A1A37598-0607-4056-96BC-C028B6879B49@microsoft.com... > Ah yes, you're right, sorry about that! > Got it working for staffer's individual shares now. > > Thanks very much for all of your help Pegasus!!! > > Very much appreciated!!!
Migrating to a new server
2 PCs networked- One connected the other not online-Help! what happens when a subnet mask doesn't match up XP Pro SP3 workstations hang on "applying computer settings" My Computer shows LAN disconnected, but it's really connected??? NT4 on a 2000 Domain From Windows XP Home I have to enter login/password for W2K share time sync DNs for Server 2003 Migrate DHCP leases only |
|||||||||||||||||||||||