Sponsored Content
Full Discussion: A Windows password script
Special Forums Windows & DOS: Issues & Discussions A Windows password script Post 302408961 by harrisandreson on Wednesday 31st of March 2010 01:33:00 AM
Old 03-31-2010
reply

Here's a script Harris that uses the Windows 2000 Resource Kit tool Cusrmgr.exe to change the Local Administrator Password. You can do more with this tool, but the script will only change the Local Administrator password. Once you compile the script as an EXE file, you can run it through SMS with Local Admin rights.
Code:
Document Type: IPF
item: Global
  Version=6.0
  Title English=Change Local Administrator Password.
  Flags=01011000
  Languages=0 0 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  LanguagesList=English
  Default Language=2
  Japanese Font Name=MS Gothic
  Japanese Font Size=10
  Start Gradient=0 0 255
  End Gradient=0 0 0
  Windows Flags=00010000000000000010110000011000
  Message Font=MS Sans Serif
  Font Size=8
  Disk Filename=SETUP
  Patch Flags=0000000000001001
  Patch Threshold=85
  Patch Memory=4000
  FTP Cluster Size=20
end
item: Custom Graphic
  Width=1010
  Height=615
  Flags=0000000010000000
  item: Rectangle
    Rectangle=0 0 509 56
    Flags=11100001
    Pen Width=1
    Brush Style=1000
    Extra Flags=00000100
  end
  item: Text
    Text English=Local Administrator Password Change.
    Rectangle=7 7 506 48
    Pen Color=16777215
    Pen Width=1
    Extra Flags=00000011
    Name=Century Gothic
    Font Style=-19 0 0 0 400 0 0 0 0 3 2 1 34
  end
  item: Rectangle
    Rectangle=772 582 1010 615
    Pen Width=1
    Brush Style=1000
    Extra Flags=00000100
  end
  item: Text
    Text English=Created By: Anand Upadhyay
    Rectangle=781 590 975 608
    Flags=00010011
    Pen Color=16777215
    Pen Width=1
    Extra Flags=00000011
    Name=MS Sans Serif
    Font Style=-12 0 0 0 0 0 0 0 0 0 0 0 0
  end
end
remarked item: Remark
  Text=Note: Compile this script to EXE and run it through SMS with Local Admin rights
end
item: Set Variable
  Variable=DEST_C
  Value=C:
end
remarked item: Remark
  Text=Make sure Cusrmgr.exe is available on C:\ drive before you compile this script.
end
remarked item: Remark
  Text=Cusrmgr.exe is available on Windows 2000 Resource kit but it is also compatible with NT 4.0
end
remarked item: Remark
  Text=Installing tool which will be removed later.
end
item: Install File
  Source=c:\Cusrmgr.exe
  Destination=%DEST_C%\Cusrmgr.exe
  Flags=0000000000100010
end
remarked item: Remark
  Text=Getting Computername from Registry and putting it into Variable.
end
item: Get Registry Key Value
  Variable=COMPUTERNAME
  Key=SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName
  Value Name=ComputerName
  Flags=00000100
end
remarked item: Remark
  Text=Resetting Local Administrator Password
end
remarked item: Remark
  Text=Change **Administrator** name in below line, only if you need to 
  and change **password** in below line with your custome password.
end
item: Execute Program
  Pathname=%DEST_C%\Cusrmgr.exe

Love you all from Harris

Last edited by pludi; 03-31-2010 at 02:37 AM.. Reason: removed unneccesary self-promotion
 

9 More Discussions You Might Find Interesting

1. Solaris

Windows 2003 sp1 to Solaris 10 6/06 password synchronization (ssod)

We are currently using ssod daemon, included with SFU 3.5, to synchronize passwords from AD to Solaris 8. We are now upgrading to a new Solaris 10 server. I loaded out the sso.conf, and the ssod on the server. Ssod seems to start up fine, but it gives an error on the console when I change a... (0 Replies)
Discussion started by: james_ryan
0 Replies

2. Windows & DOS: Issues & Discussions

How to find windows user without any password

How to find windows users without any password.. (0 Replies)
Discussion started by: RPG
0 Replies

3. AIX

How to do ssh without password from windows to AIX?

I know how to ssh without password from AIX to AIX, however, how to do it from Windows to AIX? (6 Replies)
Discussion started by: rainbow_bean
6 Replies

4. Windows & DOS: Issues & Discussions

windows startup password

Hi, a friend of mine uses windows and he changed his password (using some weird non-english characters). Now when he logged into windows, it asked for the admin password and he couldn't enter those characters (you can only turn that on once you're in windows). So is there anyway to login or... (0 Replies)
Discussion started by: chaoses
0 Replies

5. Windows & DOS: Issues & Discussions

ssh: sending password from windows client

Hi. My workstation is Windows. I use putty to connect to unix servers. The problem is that i'm doing it many times a day and each time i need to supply password. I have no control on ssh configuration on servers, because of account restrictions. So i can't use key authentication, how is suggested... (4 Replies)
Discussion started by: kukuruku
4 Replies

6. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

7. Windows & DOS: Issues & Discussions

How to Recover windows administrator password?

HI, Can anybody tell me..about recovering windows administrator password in case of Forget it. Now in Unix OS and any database,there is a fascility of recovering root/admin password.... Can window provide any such kind of fascility?....Also tell me any other normal users password recovery... (5 Replies)
Discussion started by: jagdish.machhi@
5 Replies

8. Solaris

How to set password for vnc software installed in windows machine?

i want user to prompt for password when ever he tries to login into solaris box using vnc software. is it possible.. each time the user tries to access a solaris box should be prompted for password. and each user can set his own password for his session? if all the above are possible which... (3 Replies)
Discussion started by: chidori
3 Replies

9. Red Hat

How to make a Password-Less Login from Windows to Linux using OpenSSH?

I installed the OpenSSH on my Windows Machine. I want to connect to the remote Linux machine without typing password. I followed the bellow instructions but the SSH needs password to establish the connection yet. Open CMD and run: ssh-keygen -t rsa (The public and private keys are generated in... (1 Reply)
Discussion started by: manoj.solaris
1 Replies
SYSTEMD-TTY-ASK-PASSWORD-AGENT(1)			  systemd-tty-ask-password-agent			 SYSTEMD-TTY-ASK-PASSWORD-AGENT(1)

NAME
systemd-tty-ask-password-agent - List or process pending systemd password requests SYNOPSIS
systemd-tty-ask-password-agent [OPTIONS...] [VARIABLE=VALUE...] DESCRIPTION
systemd-tty-ask-password-agent is a password agent that handles password requests of the system, for example for hard disk encryption passwords or SSL certificate passwords that need to be queried at boot-time or during runtime. systemd-tty-ask-password-agent implements the Password Agents Specification[1], and is one of many possible response agents which answer to queries formulated with systemd-ask-password(1). OPTIONS
The following options are understood: --list Lists all currently pending system password requests. --query Process all currently pending system password requests by querying the user on the calling TTY. --watch Continuously process password requests. --wall Forward password requests to wall(1) instead of querying the user on the calling TTY. --plymouth Ask question with plymouth(8) instead of querying the user on the calling TTY. --console Ask question on /dev/console instead of querying the user on the calling TTY. -h, --help Print a short help text and exit. --version Print a short version string and exit. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. SEE ALSO
systemd(1), systemctl(1), systemd-ask-password-console.service(8), wall(1), plymouth(8) NOTES
1. Password Agents Specification https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents systemd 237 SYSTEMD-TTY-ASK-PASSWORD-AGENT(1)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy