Page 1 of 1 1
Topic Options
#69095 - 2002-08-16 11:45 AM Password Resetting Script
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
Hi

I know this must have been do before so I will not spend any time on writing a script for it.

What I would like is for out HelpDesk to reset passwords, Un Lockout an Account.

We have a standard default password with the change password box on next logon ticked.

If any one has a basic script like this, evan if it not the same I can modify it and sort it out.

Thanks

Richard Farthing
2 X Windows 2000 Server running 1500 Clients

Top
#69096 - 2002-08-16 11:55 AM Re: Password Resetting Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, what is the catch?
why they can't use usermanager or similar normal gui-app?
_________________________
!

download KiXnet

Top
#69097 - 2002-08-16 11:59 AM Re: Password Resetting Script
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
The reason they can't user AD, is because they are Helpdesk staff and have no knowledge of Windows or Computers. lol

I would like to make it as basic as possible, they logon, have an icon for resetting passwors and thats it.

No reason for them to get into AD and start mucking up the system.

Thanks

Top
#69098 - 2002-08-17 12:16 AM Re: Password Resetting Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, let's say (don't know about ad domain. you should test it) default password is "firstLogon".
then changing password on commandline is like this:
net user username firstLogon /domain

setting the flag for user to change password is little bit trickier.
I made some years ago a program that does that:
www.gwspikval.com/jooel/scripts/
mustikka.exe

the program needs to be run on DC. anyway, you can accomplish this with rcmd (reskit tool).

there probably is also adsi command for this. could grawl around a little bit...
_________________________
!

download KiXnet

Top
#69099 - 2002-08-17 12:32 AM Re: Password Resetting Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, found something. the switch is $UserObj.PasswordExpired = 1
(thanks radimus)

this way, they could actually use adsi for this:
code:
$adsUser = GetObject("LDAP://cn=UserName,ou=someou,ou=myusers,dc=rz,dc=mydomain,dc=de")
if @ERROR<>0
? @SERROR + " (" + @ERROR + ")" shell "%comspec% /c pause"
exit 1
endif
$adsUser.PasswordExpired = 1
$adsUser.SetInfo
$adsUser.SetPassword($password)

there is some user query/set script in this post (where I got most of this script too [Big Grin] ):
http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=13;t=000213#000007

so, all you need to do, is to get the info from the helpdesk user.

like:
code:
"what users properties should be changed? ->"
gets $username
?
"executing..."

hope this helps
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 978 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.052 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org