Question

Locked

Restore Windows XP Users

By ryno ·
Hi, does anyone know how i can Create users with a script on windows XP?

They must have Users Cannot change Passwords and Password Never Expires Ticked?

If anyone knows how please reply

Thanks

This conversation is currently closed to new comments.

10 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

That's hardly a Restore, is it ?...

by OldER Mycroft In reply to Restore Windows XP Users

So why title it as such?

Collapse -

RE: That's hardly a Restore, is it ?

by ryno In reply to That's hardly a Restore, ...

I need the script for in case the server crashes so that i can restore all the users quickly, that is why i called it "Restore":)

Collapse -

Windows XP Users..

Stop Password Expiration
If you want to do this for all users, enter:
Start / Run / net accounts /maxpwage:unlimited

If you are getting an error message that your password is about to expire:

1.Right click on the My Computer icon
2.Select Manage
3.Go to Local Users and Groups / Users
4.Right-click on the user you want to change
5.Select Properties
6.On the General tab, check Password never expires
7.Click OK
..............................................

Hide/Unhide Logon Names
If you want to hide or unhide the names of users that are displayed on the initial logon screen:
1.Start Regedit
2.Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon \ SpecialAccounts \ UserList
3.Add a DWORD with the name of the user account you want to hide
4.Make sure it has a value of 0
5.If there is an existing account, you can unhide it by giving it a value of 1
..............................................

Stored User Names and Passwords Feature Interoperability at a Command Prompt.

By default, the Stored User Names and Passwords feature creates a "key" for any connection that you make in the graphical user interface (GUI) that requires alternate credentials. When you make a connection at a command prompt by using the net use command and by passing alternate credentials, a key is not created.
For the net use command to save the credentials in Credential Manager, use the /savecred switch. When you use the /savecred switch, any credentials that you are prompted for when you use the net use command are saved as a key.
Therefore, if you are prompted for the user name and password (or if you are prompted only for the password) when you use the net use command (but not because you used an asterisk in the net use command for password prompting) and the /savecred switch, the credentials are saved.
When you type the net use * \\ computer_name \ share_name /savecred command, the user is prompted for a user name, and then the user is prompted for a password.

When you type the net use * \\ computer_name \ share_name /u: domain_name \ user_name /savecred command, the user is prompted for a password.

However, when you type one of the following commands, a key is not created:
net use * \\ computer_name \ share_name * /user: domain_name \ user_name /savecred
-or-
net use * \\ computer_name \ share_name * /savecred /user: domain_name \ user_name

If you type net help use at a command prompt, more information is displayed about the net use command.

Please post back if you have any more problems or questions.
If this information is useful, please mark as helpful. Thanks.

Collapse -

Here is a start

by Jacky Howe In reply to Restore Windows XP Users

I can give you a heads up on the first part of the question but you will have to work out how you are going to set the Users Cannot change Passwords and Password Never Expires Ticked. PT has given you one way and there is a VB Script below that could be modified.
<br><br>
This will add the Users for you but you will need two files add2xp.cmd and 2Users.cmd. Copy both file to the root directory and run 2Users.cmd
<br><br>
add2xp.cmd
<br>
@echo on
<br>
net user %1 %2 /add /fullname:"%3 %4" /comment:"User"
<br><br>
2Users.cmd
<br>
@echo on
<br>
call c:\add2xp.cmd John password John Jones
<br>
call c:\add2xp.cmd Jill password Jill Jones
<br>
call c:\add2xp.cmd Wane password Wane Kerr
<br><br>
Edited for Variables
<br>
%1 = Username
<br>
%2 = password
<br>
%3 = First Name
<br>
%4 = Last Name
<br><br>
The User is created as a Restricted User and is able to operate the computer and save documents, but cannot install programs or change system settings.
<br><br>
C:\>net user dave dave /add /fullname:"David Davidson" /comment:"User"
<br>
The command completed successfully.
<br><br>
Script to modify password
<br>
http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/hey1202.mspx
<br><br>

Errors occurred when trying to set a group or maxpwage from the command line because you are not in a Domain environment.
<br><br>
net group "users" %1 /add
<br>
C:\>net group "users" dave /add
<br>
This command can be used only on a Windows Domain Controller.
<br>
More help is available by typing NET HELPMSG 3515.
<br>
C:\>net accounts /MAXPWAGE:UNLIMITED /DOMAIN
<br>
The request will be processed at a domain controller for domain ****.local.
<br>
System error 1326 has occurred.
<br>
Logon failure: unknown user name or bad password.
<br><br>
<i>Keep us informed as to your progress if you require further assistance.</i>
<br><br>
<i>If you think that any of the posts that have been made by all TR Members, have solved or contributed to solving the problem, please Mark them as <b>Helpful</b> so that others may benefit from the outcome.
</i>

Collapse -

Thanks for all the help but i have another question

by ryno In reply to Here is a start

I used the Script to modify password in my VB script and everything is working as planned, now i now i just need to add the user to a group, do you guys know how to do that?

Collapse -

This should do the trick

by Jacky Howe In reply to Thanks for all the help b ...

You will have to create the group first
<br>
net localgroup "test" %1 /add
<br><br>
<i>Keep us informed as to your progress if you require further assistance.</i>
<br><br>
<i>If you think that any of the posts that have been made by all TR Members, have solved or contributed to solving the problem, please Mark them as <b>Helpful</b> so that others may benefit from the outcome.
</i>

Collapse -

RE: This should do the trick

by ryno In reply to This should do the trick

Hi,

Thanks for the reply, where should i add this?

Collapse -

If you haven't already added the users

by Jacky Howe In reply to RE: This should do the tr ...

you can add the line to add2xp.cmd
<br>
You will need another 2 files grp.cmd and add2grp.cmd
<br><br>
grp.cmd
<br>
net localgroup "test" %1 /add
<br><br>
add2grp.cmd
<br>
call c:\grp.cmd John
<br>
call c:\grp.cmd Jill
<br>
call c:\grp.cmd Wane
<br><br>
<i>Keep us informed as to your progress if you require further assistance.</i>
<br><br>
<i>If you think that any of the posts that have been made by all TR Members, have solved or contributed to solving the problem, please Mark them as <b>Helpful</b> so that others may benefit from the outcome.
</i>

Collapse -

Re: Restore Windows XP Users

by o.lasitha In reply to Restore Windows XP Users

User Creation
=============
Step 1:
net user User1 /add

Explanation: This command will create a new user named User1, with no password. By default, User1 will have Limited User privileges.

OR

net user User1 123 /add

Explanation: This command will create a new user named User1, with 123 as its password. By default, User1 will have Limited User privileges.

net localgroup Administrators User1 /add

Explanation: This command will add User1 to Administrator group.

create a new .cmd or .bat file with above commands.


For User Cannot change password and Password never expires
============================================

I haven't try that part. But, If you can get yourself on a free Registry Monitoring and Comparing Software, then it will be easier.

After installing that software,
Create a new user called User1 manually.

Log User1 to the system, for once.

Then log out and log back into a user account with Administrator Privileges.

Don't go and tick those entries, for User1 now.

Take a snapshot of the current status of the Registry, by that software.

Then manually put the ticks for "User cannot change password" and "Password never expires" options, for User1.

By doing this, some registry entry values are bound to get changed.

So now, take a new snapshot of the registry and use the software to compare those two snapshots.

(Different softwares use different option names for these functions, so please refer to that software's Help to get to know these functions.)

When the software starts to compare, it will point out the registry entries which are different, between the two snapshots.

Then what u have to do is, jot them into a .reg file.

Now delete User1. run the .cmd or .bat you created earlier, and then run the .reg file.

That's the way to do it, in Windows XP.

Are you hoping to do this with an XP installation?

Back to Software Forum
10 total posts (Page 1 of 1)  

Software Forums