#75738 - 2003-07-08 02:52 PM
Using SU in a script
|
Anonymous
Anonymous
Unregistered
|
I'm trying to get the following scipt to work, but I'm getting an error because of the permissions. Can anyone tell me what I'm doing wrong?
code:
setl "SU_COMMANDLINE=Power.com" setl "SU_USERNAME=admin" setl "SU_PASSWORD=password" Shell su.exe
The power.com is just a bat file I converted to a COM file. The command adds user/groups to local groups on a 2000 workstation. power.com needs to run with Administrative rights so I am using the local admin account on the computer.
|
|
Top
|
|
|
|
#75741 - 2003-07-08 03:20 PM
Re: Using SU in a script
|
Anonymous
Anonymous
Unregistered
|
I don't get any error message on the screen. the power.com launches, but nothing happens. My account has administrative rights and it does make the changes when I run it. The account I'm trying to run the command under is an account on the local machine. Does that make a difference in the SU command?
P.S. DANG you guys answer quick! Thanks!
|
|
Top
|
|
|
|
#75742 - 2003-07-08 03:24 PM
Re: Using SU in a script
|
Anonymous
Anonymous
Unregistered
|
Correction....it doesn't work when I'm logged in! :-( Power.com runs, but nothing happens at ALL! :-( But if I run power.com not in a script as myself, it does make the changes.
|
|
Top
|
|
|
|
#75744 - 2003-07-08 03:35 PM
Re: Using SU in a script
|
Anonymous
Anonymous
Unregistered
|
Using a domain account worked! That's a start/option!! I adding setl "SU_DOMAIN=@WKSTA" to the script to get it to use the local user account with the rights to do it, but that didn't work. Any clue how to get it to use a local account? Thanks!
|
|
Top
|
|
|
|
#75751 - 2003-07-08 05:27 PM
Re: Using SU in a script
|
Anonymous
Anonymous
Unregistered
|
FYI - The command I'm using is net localgroup
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 952 anonymous users online.
|
|
|