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
Compound(3pm)						User Contributed Perl Documentation					     Compound(3pm)

NAME
Tk::Compound - Create multi-line compound images. SYNOPSIS
use Tk::Compound; $image = $widget->Compound(name,options); $image->Line(options); $image->Text(options); $image->Bitmap(options); $image->Image(options); $image->Space(options); DESCRIPTION
Compound image types can be used to create images that consists of multiple horizontal lines; each line is composed of a series of items (texts, bitmaps, images or spaces) arranged from left to right. Compound images are mainly used to embed complex drawings into widgets that support the -image option. As shown in the EXAMPLE section below, a compound image can be used to display a bitmap and a text string simutaneously in a Tk Button widget. Compound images can only be used on windows on the same display as, and with the same pixel depth and visual as the $widget used to create them. CREATING COMPOUND IMAGES
Compounds are created using $widget->Compound. Compounds support the following options: -background => color Specifies the background color of the compound image. This color is also used as the default background color for the bitmap items in the compound image. -borderwidth => pixels Specifies a non-negative value indicating the width of the 3-D border drawn around the compound image. -font => font Specifies the default font for the text items in the compound image. -foreground => color Specifies the default foreground color for the bitmap and text items in the compound image. -padx => value Specifies a non-negative value indicating how much extra space to request for the compound image in the X-direction. The value may have any of the forms acceptable to Tk_GetPixels(3). -pady => value Specifies a non-negative value indicating how much extra space to request for the compound image in the Y-direction. -relief => value Specifies the 3-D effect desired for the background of the compound image. Acceptable values are raised, sunken, flat, ridge, and groove. -showbackground => value Specifies whether the background and the 3D borders should be drawn. Must be a valid boolean value. By default the background is not drawn and the compound image appears to have a transparent background. IMAGE COMMAND
When a compound image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The object also supports the following methods: $compound->Line?(option = value ...>)? Creates a new line at the bottom of the compound image. Lines support the following options: -anchor value Specifies how the line should be aligned along the horizontal axis. When the values are w, sw or nw, the line is aligned to the left. When the values are c, s or n, the line is aligned to the middle. When the values are e, se or ne, the line is aligned to the right. -padx => value Specifies a non-negative value indicating how much extra space to request for this line in the X-direction. $compound->Itemtype?(option = value ...>)? Creates a new item of the type Itemtype at the end of the last line of the compound image. All types of items support these following common options: -anchor value Specifies how the item should be aligned along the vertical axis. When the values are n, nw or ne, the item is aligned to the top of the line. When the values are c, w or e, the item is aligned to the middle of the line. When the values are s, se or sw, the item is aligned to the bottom of the line. -padx => value Specifies a non-negative value indicating how much extra space to request for this item in the X-direction. -pady => value Specifies a non-negative value indicating how much extra space to request for this item in the Y-direction. item-type can be any of the following: $compound->Bitmap?(option = value ...>)? Creates a new bitmap item of at the end of the last line of the compound image. Additional options accepted by the bitmap type are: -background => color Specifies the background color of the bitmap item. -bitmap => name Specifies a bitmap to display in this item, in any of the forms acceptable to Tk_GetBitmap(3). -foreground => color Specifies the foreground color of the bitmap item. $compound->Image?(option = value ...>)? Creates a new image item of at the end of the last line of the compound image. Additional options accepted by the image type are: -image => name Specifies an image to display in this item. name must have been created with the image create command. $compound->Space?(option = value ...>)? Creates a new space item of at the end of the last line of the compound image. Space items do not display anything. They just acts as space holders that add additional spaces between items inside a compound image. Additional options accepted by the image type are: -width => value Specifies the width of this space. The value may have any of the forms acceptable to Tk_GetPixels(3). -height => value Specifies the height of this space. The value may have any of the forms acceptable to Tk_GetPixels(3). $compound->Text?(option = value ...>)? Creates a new text item of at the end of the last line of the compound image. Additional options accepted by the text type are: -background => color Specifies the background color of the text item. -font => name Specifies the font to be used for this text item. -foreground => color Specifies the foreground color of the text item. -justify value When there are multiple lines of text displayed in a text item, this option determines how the lines line up with each other. value must be one of left, center, or right. Left means that the lines' left edges all line up, center means that the lines' centers are aligned, and right means that the lines' right edges line up. -text => string Specifies a text string to display in this text item. -underline value Specifies the integer index of a character to underline in the text item. 0 corresponds to the first character of the text displayed in the text item, 1 to the next character, and so on. -wraplength value This option specifies the maximum line length of the label string on this text item. If the line length of the label string exceeds this length, it is wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text. EXAMPLE
The following example creates a compound image with a bitmap and a text string and places this image into a Button(n) widget. Notice that the image must be created using the widget that it resides in. my $b = $parent->Button; my $c = $b->Compound; $b->configure(-image => $c); $c->Line; $c->Bitmap(-bitmap => 'warning'); $c->Space(-width => 8); $c->Text(-text => "Warning", -underline => 0); $b->pack; KEYWORDS
image(n), Tix(n) perl v5.14.2 2010-05-29 Compound(3pm)
All times are GMT -4. The time now is 12:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy