MSFN Forum: user acounts - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

user acounts Rate Topic: -----

#1 User is offline   chiners_68 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 02-March 05

Posted 06 April 2006 - 04:19 AM

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


#2 User is offline   cancerface 

  • a n00b for life
  • PipPip
  • Group: Members
  • Posts: 135
  • Joined: 27-February 05

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:
cusrmgr.exe -u Staff +x CanNotChangePassword +x PasswordNeverExpires
cusrmgr.exe -u Student +x CanNotChangePassword +x PasswordNeverExpires

CF

#3 User is offline   chiners_68 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 02-March 05

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?

#4 User is offline   cancerface 

  • a n00b for life
  • PipPip
  • Group: Members
  • Posts: 135
  • Joined: 27-February 05

Posted 06 April 2006 - 08:12 AM

It should work for non-amin accounts.
A google search would point you to this page where you can download it IF you have a valid license.
CF

#5 User is offline   tguy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 698
  • Joined: 19-May 04

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.

#6 User is offline   cancerface 

  • a n00b for life
  • PipPip
  • Group: Members
  • Posts: 135
  • Joined: 27-February 05

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:
wmic.exe UserAccount Where Name="Student" Set PasswordExpires= FALSE, PasswordChangeable= False

:w00t:

CF

#7 User is offline   chiners_68 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 02-March 05

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 User is offline   cancerface 

  • a n00b for life
  • PipPip
  • Group: Members
  • Posts: 135
  • Joined: 27-February 05

Posted 12 April 2006 - 03:38 PM

Shouldn't it be:
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 User is offline   chiners_68 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 02-March 05

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy