right..
ive got the following accounts being setup from my RunOnceEX command. how do i set the accounts so the password cannot be changed & account dosent expire..?
net user Staff Password /ADD
net accounts /maxpwage:unlimited
net user Student Password /ADD
net accounts /maxpwage:unlimited
Page 1 of 1
user acounts
#2
Posted 06 April 2006 - 04:50 AM
CUSRMGR.EXE does the trick ...
The options that you are looking for are CanNotChangePassword and PasswordNeverExpires so it would look like this:
CF
The options that you are looking for are CanNotChangePassword and PasswordNeverExpires so it would look like this:
cusrmgr.exe -u Staff +x CanNotChangePassword +x PasswordNeverExpires cusrmgr.exe -u Student +x CanNotChangePassword +x PasswordNeverExpires
CF
#3
Posted 06 April 2006 - 05:52 AM
all the documents on CUSRMGR.EXE seem to point to refere to administrator accounts. does it work on normal local accounts too..?
can i get a copy of CUSRMGR.EXE put it in my ris install files run the command after the accounts are created & then remove the CUSRMGR.EXE file?
can i get a copy of CUSRMGR.EXE put it in my ris install files run the command after the accounts are created & then remove the CUSRMGR.EXE file?
#5
Posted 06 April 2006 - 11:47 AM
I have used cusrmgr.exe to change local computer accounts and know it to work the way you would want to use it.
Good luck.
Good luck.
#6
Posted 07 April 2006 - 08:09 AM
I have been playing around with wmic.exe and it appears that you can get the result that you want, without the need for any other (external) tools.
In order to disable a user's password (in your case the user was 'Student') from expiring and from being changed you would have to do the following from a command prompt or within some script:
CF
In order to disable a user's password (in your case the user was 'Student') from expiring and from being changed you would have to do the following from a command prompt or within some script:
wmic.exe UserAccount Where Name="Student" Set PasswordExpires= FALSE, PasswordChangeable= False
CF
#7
Posted 12 April 2006 - 08:46 AM
right. I done what you said cancerface but it didnt seem to work.. seee if ive got it correct here
net user Staff Password /ADD net localgroup "Administrators" /ADD Staff net accounts /maxpwage:unlimited wmic.exe UserAccount Where Name="Student" Set PasswordExpires= FALSE, PasswordChangeable= False net user Student Password /ADD net accounts /maxpwage:unlimited wmic.exe UserAccount Where Name="Staff" Set PasswordExpires= FALSE, PasswordChangeable= False
#8
Posted 12 April 2006 - 03:38 PM
Shouldn't it be:
It makes sense to first create the account (Student) and then make the password not expire
I run the above code in XP and it worked fine
I got both accounts and the password is set to not expire + it cannot be changed
However, I have not tested this from RunOnceEx. I can say that it will not work from cmdlines as WMI is not fully functional at that stage. I have tested CUSRMGR.EXE from both cmdlines and RunOnceEx and I can confirm that it works (see my previous post)
CF
net user Staff Password /ADD net localgroup "Administrators" /ADD Staff net accounts /maxpwage:unlimited wmic.exe UserAccount Where Name="Staff" Set PasswordExpires= FALSE, PasswordChangeable= False net user Student Password /ADD net accounts /maxpwage:unlimited wmic.exe UserAccount Where Name="Student" Set PasswordExpires= FALSE, PasswordChangeable= False
It makes sense to first create the account (Student) and then make the password not expire
I run the above code in XP and it worked fine
I got both accounts and the password is set to not expire + it cannot be changed
However, I have not tested this from RunOnceEx. I can say that it will not work from cmdlines as WMI is not fully functional at that stage. I have tested CUSRMGR.EXE from both cmdlines and RunOnceEx and I can confirm that it works (see my previous post)
CF
This post has been edited by cancerface: 12 April 2006 - 03:44 PM
#9
Posted 13 April 2006 - 03:41 AM
ooppss, my mistake..
I think ill have to call a batch file in runonce for it to set the accounts to not expire etc.
I think ill have to call a batch file in runonce for it to set the accounts to not expire etc.
Share this topic:
Page 1 of 1



Help

Back to top








