SU command in ms cmd prompt - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
Thread Tools Display Modes
Old 08-27-2003, 10:25 AM   #1 (permalink)
Newb Techie
Join Date: Jul 2003
Posts: 10
Default SU command in ms cmd prompt


Can anyone help me?

I have a batch script that alters a registry setting,problem is it needs to run on a machine where the user does not have admin rights.

When the script runs the registry change is denied.

SO - How do I use the su command?

if i do :su username
I get :Password?

Obviously the user doesn't know the admin password and I'm not gonna tell him.

So how do I feed the password into the script and keep it hidden.
Whats the syntax?

Many thanks.

babaton is offline  
Old 08-27-2003, 01:34 PM   #2 (permalink)
Ultra Techie
dethangel's Avatar
Join Date: Apr 2003
Posts: 934

should be SU password

dethangel is offline  
Old 08-28-2003, 04:09 AM   #3 (permalink)
Newb Techie
Join Date: Jul 2003
Posts: 10


no matter what I put after su I get a prompt for password.

The syntax for the su comand is :

su <user> "cmdline" [domain] [winsta\]desktop] [options]

No mention of password there.

I know It can be done as I have done it before but can't remember how.
I know that I referenced a file with the password in it.

babaton is offline  
Old 08-28-2003, 06:41 AM   #4 (permalink)
Techie Beyond Description
Apokalipse's Avatar
Join Date: Jun 2003
Location: Melbourne, Australia
Posts: 14,559

so it's asking for the password, and you know what it is but you don't want to tell him, he doesn't have to know you can type it in

put in "su username" press enter
then put in password then enter
it should work
Apokalipse is offline  
Old 08-28-2003, 07:36 AM   #5 (permalink)
Newb Techie
Join Date: Jul 2003
Posts: 10

Yeah,well obviously that would be cool except its not just one user its more like 20 and the script runs on login so I'm not gonna be around to type in admin passwords for everyone all day.

come on some one must have seen it done....
babaton is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 05:47 AM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.