#70706 - 2002-10-08 06:13 PM
su.exe question
|
cj06
Fresh Scripter
Registered: 2002-09-26
Posts: 7
|
This is related to my question posted yesterday. When trying to avoid a password-prompt when using su.exe, the W2K resource kit says that you can avoid the prompt by typing the following: su username < c:\password\username.txt The password for user username is obtained from c:\password\username.txt. The password must be followed by a carriage return in the file username.txt. Can someone help me by typing an example to help me to get this to work? I don't know what symbol or character to type in the "username.txt" file related to "carriage Return" Thanks.
|
|
Top
|
|
|
|
#70708 - 2002-10-08 06:32 PM
Re: su.exe question
|
avazquez49
Fresh Scripter
Registered: 2002-10-07
Posts: 6
Loc: Ohio
|
Don't use Notepad if you are trying to do carriage returns.
Try using the DOS Edit Program.
|
|
Top
|
|
|
|
#70709 - 2002-10-08 06:38 PM
Re: su.exe question
|
cj06
Fresh Scripter
Registered: 2002-09-26
Posts: 7
|
Yes, I tried all the suggestions and all of them were good ones, but they do not seem to work.
|
|
Top
|
|
|
|
#70716 - 2002-10-09 08:47 PM
Re: su.exe question
|
cj06
Fresh Scripter
Registered: 2002-09-26
Posts: 7
|
Everyone, thanks for the responses. Waltz was correct with his suggestions. In my kix file I have: shell "cmd /c su administrator < c:\winnt\pw.txt "executable.exe" -w In the pw.txt file, I typed in the admin password and hit enter at the end of the word. Fo security purposes, I like this method the best because the password is stored in a file on the hard drive. Users will unlikely stumble upon it and open it. If you put it in an environmental variable, the user can see what it is by System, Advanced, Environmental Variables. If you do the echo password | username method then the password is exposed in the netlogon share and you probabably don't want other people to look at it if you are on a pretty large domain with multiple people accessing the share to add their files to work with their OU in AD.
|
|
Top
|
|
|
|
#70721 - 2002-10-14 09:06 PM
Re: su.exe question
|
cj06
Fresh Scripter
Registered: 2002-09-26
Posts: 7
|
LLigetfa, login scripts don't run visible when you are in a W2K shop. The text is suppressed. That's probably why I didn't think of that since no one uses w9X here anymore. As far as using task scheduler instead of su. If anyone knows how to get ts to recognize an autoit script saved as an .exe file let me know. Otherwise I'll use su to run the autoit scripts since I use them to run W2K critical updates when users log on.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 778 anonymous users online.
|
|
|