Authenticating as Admin via CMD

Linux_newb

Active Member
Joined
Apr 25, 2010
Messages
80
Reaction score
0
Hi there,

I'm trying to shutdown a computer on our home network using 'shutdown -i' command via CMD, but it won't let me as I'm not seen as an Administrator.

Someone told me before there is a command you can use to auth yourself as an Admin of that pc - which means you cannot shutdown the remote pc until you've entered the command with the admin credentials.

Any idea what that command is so that I have Admin rights on the other pc from mine?

Help please :)
 
your account you logged into on your pc needs to also exist on the remote pc, with same password, and have admin rights on the remote pc.

then it works (workgroup scenario)

domain scenario, just make sure you have domain admin rights.

but another maybe better thing to do is grab the pstools package (psexec, psshutdown etc) and learn how to use them
 
Hi Werner,

There is a single line command you enter with the remote pc's admin username and password that authenticates you as an Admin, from any pc.. something like:

C:\Users\user>something something username password [enter]

Once you've entered this command, it will recognise you as that pc's admin... Just can't remember the command :(

This worked really great for me - didnt have to do anything else, any idea?
 
Still getting:

C:\Users\user>shutdown -i
\\spare-pc: Access is denied.(5)

Can't remember if it was 'net user' - damn hate getting old!

Where are the MCSE guys????
 
runas /user:administrator shutdown -i

then you need to enter a password

I do it using a script
Not really necessary, you can parse the password in the command/batch file itself.

Something like this should work, with the password within quotes:
net use \\<computer name> /user:<username> "<password>"
shutdown -i
 
Last edited:
Confusion

Can't remember if it was 'net user' - damn hate getting old!
Where are the MCSE guys????

Did you follow the link to M$ support that I gave you ?

Your user name is "Linux_newb" but you are talking about CMD which is I assume is CMD.exe the M$ "shell" command line ????

In which case I would think that an M$ trained person -- ie MCSE would have the knowledge to help you .......

Capiche ??????
 
Did you follow the link to M$ support that I gave you ?

Your user name is "Linux_newb" but you are talking about CMD which is I assume is CMD.exe the M$ "shell" command line ????

In which case I would think that an M$ trained person -- ie MCSE would have the knowledge to help you .......

Capiche ??????

I'm also a semi MS newb :) Correct command seems to be 'net use' and not 'net user' as per link you gave me, but thanks, put me on the right path :)
 
NET USE \\PCNAME\admin$ /USER:administrator
 
Last edited:
I guess launching the actual CMD with administrator privileges isn't an option then?

That would be relative to the local machine. He needs admin priveleges on the remote machine to remotely shut it down.
 
Psexec to remotely trigger a command,Runas command,VBS Script to fill in the password
 
/sigh

You guys and your elaborate schemes :D

Post #7 tells you how to specify the credentials (username and password) for the remote machine directly from the command prompt.
 
/sigh

You guys and your elaborate schemes :D

Post #7 tells you how to specify the credentials (username and password) for the remote machine directly from the command prompt.
No.

Net use

Connects a computer to or disconnects a computer from a shared resource, or displays information about computer connections. The command also controls persistent net connections. Used without parameters, net use retrieves a list of network connections.
 
In a domain context when you are logged in as administrator,sure
 
goto DOS:

net use \\target_computer\IPC$ /user:target_PC_name\administrator /persistent:Y
now enter your target PC admin password.
u should get a "command completed successfully"
now run your shutdown goody.

There are also lots of freeware shutdown.exe and reboot.exe programs with a GUI (much easier than going via command line)
 
Top
Sign up to the MyBroadband newsletter
X