Kevin Gay
2006-11-10 15:26:01 UTC
I'm looking for the technique used (if it exists) to pass the username and
password (if needed) to a server to authenticate with it in a domain.
Basically I want to create a console program to pass the credentials when
called. The command would look something like "crenpass /u:<username>
/p:<password>" \\server\share", this is so I can call this prior to say
running or copying files from an IT only server in a batch file for a user
that normally does not have access to a server share. Don't warn me about the
security problem of putting a username and password in a batch file, I have
ways of encrypting that data so a user couldn't ever see or figure out the
password. In our enviroment once you auth with a share you have access to
that until a reboot, also I need it to overwrite the current logged on users
cred when accessing the server. Heres an example of a batch file.
credpass /u:joe /p:joepass \\server\share
copy \\server\share\file C:\
All my searches keep poping up with system.security.Authentication and
CoSetProxyblanket, those look like they are on the right track, I just want
to put in username and pass when/if the login prompt comes up for accessing a
server share.
password (if needed) to a server to authenticate with it in a domain.
Basically I want to create a console program to pass the credentials when
called. The command would look something like "crenpass /u:<username>
/p:<password>" \\server\share", this is so I can call this prior to say
running or copying files from an IT only server in a batch file for a user
that normally does not have access to a server share. Don't warn me about the
security problem of putting a username and password in a batch file, I have
ways of encrypting that data so a user couldn't ever see or figure out the
password. In our enviroment once you auth with a share you have access to
that until a reboot, also I need it to overwrite the current logged on users
cred when accessing the server. Heres an example of a batch file.
credpass /u:joe /p:joepass \\server\share
copy \\server\share\file C:\
All my searches keep poping up with system.security.Authentication and
CoSetProxyblanket, those look like they are on the right track, I just want
to put in username and pass when/if the login prompt comes up for accessing a
server share.