Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon script

Status
Not open for further replies.
Sep 4, 2008
13
US
Is there a way to set up a long script in Active directory and have it map drives that are located somewhere else and need to use a different username and password than their domian login.
 
VBScript
Code:
WSHNetwork.MapNetworkDrive "Z:", "\\ServerName\ShareName", "False", "username", "password"

Batch file
Code:
net use Z: \\ServerName\ShareName /user:username password /persistent:no


RoadKi11

"This apparent fear reaction is typical, rather than try to solve technical problems technically, policy solutions are often chosen." - Fred Cohen
 
Hmmmm.... so what's to prevent someone from browsing to the netlogon share, and viewing the script? That would give them access to the info to get them into that data share. Not very secure.

Pat Richard MVP
Plan for performance, and capacity takes care of itself. Plan for capacity, and suffer poor performance.
 
Valid argument 58sniper, thats why i use an app called exescript that compiles the script into an exe. Granted someone could use a decompiler but thats pretty unlikely, but then again nothing is bulletproof.




RoadKi11

"This apparent fear reaction is typical, rather than try to solve technical problems technically, policy solutions are often chosen." - Fred Cohen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top