Page 1 of 1
How to set up a static drivemapping ?
#1
Posted 10 December 2001 - 04:45 PM
Hi !
I been trying to setup a drivemapping on a win2k server without the
need of a user to be logged on. I have tried to schedule a batchfile (net use blablabla) to be started when the computer start
and tried to make a service of the batchfile without any success....
Anyone know how to do this? A thirdparty app perhaps? If thirdparty it would be great if it was freeware since this is a just a testserver...The server is a
member of a domian and I was planning to use a domainaccount for this mapping.
Thanks in advance.
/Toby
I been trying to setup a drivemapping on a win2k server without the
need of a user to be logged on. I have tried to schedule a batchfile (net use blablabla) to be started when the computer start
and tried to make a service of the batchfile without any success....
Anyone know how to do this? A thirdparty app perhaps? If thirdparty it would be great if it was freeware since this is a just a testserver...The server is a
member of a domian and I was planning to use a domainaccount for this mapping.
Thanks in advance.
/Toby
#3
Posted 10 December 2001 - 05:37 PM
Won't work, c$ is just a share like anyone else. Need to logon before connecting to it.
The application that runs on the server is a Lotus-server and that shitty piece of crap can't use UNC paths. It can only access the data on another server through a driveletter. I want the share to be mapped without anyone need to be logged on locally.
Hope this clear it up a bit
Cheers!
/Toby
The application that runs on the server is a Lotus-server and that shitty piece of crap can't use UNC paths. It can only access the data on another server through a driveletter. I want the share to be mapped without anyone need to be logged on locally.
Hope this clear it up a bit
Cheers!
/Toby
#4
Posted 10 December 2001 - 10:43 PM
I think you can run your mapping batch file at startup via your group policy editor. Open "gpedit.msc", and go here:

and when you double click on "startup", you will get this window here:

I haven't fiddled with it, but I was under the impression that this will behave in the manner you are looking for (runs scripts when system launches, not user). The logon/logoff companion to this is under the User Config half below the Windows settings.
HTH

and when you double click on "startup", you will get this window here:

I haven't fiddled with it, but I was under the impression that this will behave in the manner you are looking for (runs scripts when system launches, not user). The logon/logoff companion to this is under the User Config half below the Windows settings.
HTH
#5
Posted 10 December 2001 - 10:59 PM
Thanks for the tip !
I'll try it tomorrow when I get back to work and I'll let you know how it worked out.
/Toby
I'll try it tomorrow when I get back to work and I'll let you know how it worked out.
/Toby
#7
Posted 11 December 2001 - 02:40 PM
It did work !
The only problem with this method is that there is no way to choose
under what user the script should run. So I ended up with the password i clear text in the batchfile. No big deal, but something to think about when looking trough the ntfs-permissions on the batchfiles.
Thanks
/Toby
The only problem with this method is that there is no way to choose
under what user the script should run. So I ended up with the password i clear text in the batchfile. No big deal, but something to think about when looking trough the ntfs-permissions on the batchfiles.
Thanks
/Toby
#8
Posted 19 December 2001 - 01:25 AM
Personnaly I'd have made it a service using SrvAny.exe (from the resource kit utilities) & a "Cmd.exe c:\path_to\script.cmd". The service would have been running as a domain user account, with access perms to that share.
#9
Posted 19 December 2001 - 02:44 AM
Have you done this before? It sounds like it would actually be launching the running the script under the system account, rather than a user account. Is that something that you can configure separately using srvany (I haven't fiddled with it, but I have adjusted running permissions in other services in the past)?
#10
Posted 20 December 2001 - 02:14 AM
Yup I've done this.
Simply configure the server to start using a domain account (restricted to this machine if needed) so it will use this account credentials instead of LOCALSYSTEM built-in acount (which has obviously no access to domain-shared resources)
Simply configure the server to start using a domain account (restricted to this machine if needed) so it will use this account credentials instead of LOCALSYSTEM built-in acount (which has obviously no access to domain-shared resources)
#11
Posted 20 December 2001 - 02:22 AM
Oh, BTW, use instsrv.exe (from sresource kit, still) to install SrvAny as a service. To configure SrvAny.exe, go into the registry and create a _KEY_ named Parameters under the Service's key and two value :
Application --> REG_SZ (REG_EXPAND_SZ won't work (dumbass))
Value: C:\WINNT\System32\cmd.exe
AppParameters --> REG_SZ
Value: /C C:\Scripts\mapdrives.cmd
The script will probably shutdown the service itself (because of /C).
Keep in mind that the credentials used are those associated to the domain user account, so services like RSH will use that credentials to validate permissions to the network drive, files & directories.
Anyhow, the domain user account may be also required to open a session on the remote computer (depending if it's a domain controller or not)
Application --> REG_SZ (REG_EXPAND_SZ won't work (dumbass))
Value: C:\WINNT\System32\cmd.exe
AppParameters --> REG_SZ
Value: /C C:\Scripts\mapdrives.cmd
The script will probably shutdown the service itself (because of /C).
Keep in mind that the credentials used are those associated to the domain user account, so services like RSH will use that credentials to validate permissions to the network drive, files & directories.
Anyhow, the domain user account may be also required to open a session on the remote computer (depending if it's a domain controller or not)
#12
Posted 20 December 2001 - 02:31 AM
Cool, I have seen this request before but I only knew of the more advanced scripting policy controls in Win2K (as NT was quite limited). Thanks for the info.
Share this topic:
Page 1 of 1

Help










