Video Screencast Help

Use Altiris DS Remotely to Create a User with Admin Rights

Created: 10 Mar 2011 • Updated: 10 Mar 2011 | 2 comments
jamesmax's picture
0 0 Votes
Login to vote

After trying to get access to a computer that we no longer had admin rights to, I decided to try using Altiris DS to create a user with admin rights (Altiris client was still installed).

Well it worked. Here is the code that I ran as a script:
 
net user username password /add
net localgroup administrators username /add
 
I have attached a job file that you can import. You need to rename it .bin instead of .txt
Sometimes it doesn't work (maybe not Windows 7 - but it is worth a shot).

Comments 2 CommentsJump to latest comment

tloenhorst's picture

I would do it this way since the above, while a good solution, shows the script in plain-text. Here is a VB script you can run via DS. You can use a tool like VBSEdit to change the VBS file into an EXE which will hide the text a little better.

Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000

strComputer = "."
Set colAccounts = GetObject("WinNT://" & strComputer & ",computer")
'Sets username
Set objUser = colAccounts.Create("user", "userguy")
'Sets password
objUser.SetPassword "password1234"
'Sets Display Name of account
objUser.Put "fullname", "bob kid"
'Sets description
objUser.Put "description", "Windows Account"
'Sets PW to not expire
objPasswordExpirationFlag = ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", objPasswordExpirationFlag
objUser.SetInfo
 

0
Login to vote
jamesmax's picture

Nice! I'm glad you got that working too. I suppose there are many ways to get into a system that you no longer have admin rights to. Thanks for sharing!

0
Login to vote