Toon posts:

NET USER (bug win2k)?

Pagina: 1
Acties:

Verwijderd

Topicstarter
ik wil via een batchfile een user adden op mijn systeem, dit doe ik als volgt:

code:
1
2
3
net user Sophos /add /fullname:"Sophos Antivirus" /comment:"Sophos Autoupgrade Account" /EXPIRES:NEVER /passwordchg:no
net localgroup Hoofdgebruikers /add Sophos
net localgroup gebruikers /del Sophos


dit alles gaat goed, maar de parameter "/expires" werkt niet, ik heb hier veel mee getest en ik kan ook geen datum opgeven om te laten expiren....

als ik via windows usermanagement ga kijken, kan ik wel via een vink-vakje het wachtwoord nooit laten verlopen, maar ik wil het dus via mijn batchfile doen

Is dit gewoon een bug of ben ik nou zo stom?

  • elevator
  • Registratie: December 2001
  • Niet online

elevator

Officieel moto fan :)

Causes the user account to expire if you specify date. Expiration dates can be in [MM/DD/YYYY], [DD/MM/YYYY], or [mmm,dd ,YYYY] format, depending on the Country/Region code. Note that the account expires at the beginning of the specified date. For the month value, you can use numbers, spell it out, or use a three-letter abbreviation (that is, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec). You can use two or four numbers for the year value. Use commas or slashes to separate parts of the date. Do not use spaces. If you omit YYYY, the next occurrence of the date (that is, according to your computer's date and time) is assumed. For example, the following entries are equivalent if entered between Jan. 10, 1994, and Jan. 8, 1995:
jan,9
1/9/95
january,9,1995
1/9
Het stelt dus de expiration date in van de account en niet van het wachtwoord :)
Voor wat jij wilt - kijk hier eens: http://www.jsiinc.com/SUBB/tip0500/rh0570.htm ? :)

Verwijderd

Topicstarter
ah, ja dat is precies wat ik moest hebben... ik kon het zelf niet vinden

Hardstikke bedankt! :)

Verwijderd

addusers kan het wel (resource kit)