Page 1 of 1 1
Topic Options
#121034 - 2004-06-10 05:41 PM Changing the Local Admin Password via KixTart
Geert Offline
Fresh Scripter

Registered: 2004-06-10
Posts: 5
Why this:

$strComputer = @wksta
$StrPassword = "!Q2wholaa"

$objUser = GetObject("WinNT://$strComputer/Administrator,user")
$objUser.SetPassword = $StrPassword
$objUser.SetInfo

Isn't working?
I tries all kinds of combinations but it want's to argue with me.

Thanks in advance

Top
#121035 - 2004-06-10 05:55 PM Re: Changing the Local Admin Password via KixTart
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
I take it this is in the logon script?

do the local users have local admin rights, since the logon script runs under their security rights.

Top
#121036 - 2004-06-10 05:58 PM Re: Changing the Local Admin Password via KixTart
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
try this...

$objUser.SetPassword($StrPassword)


Top
#121037 - 2004-06-10 06:02 PM Re: Changing the Local Admin Password via KixTart
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Please... it's KiXtart, not KixTart. If you are interested in having a central script change passwords remotely, I posted a script that uses Howard's RenameAdmin.exe utility.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#121038 - 2004-06-10 06:52 PM Re: Changing the Local Admin Password via KixTart
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
you can also use RemoteExec()

and send "net user administrator newpassword" to the remote PC
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#121039 - 2004-06-11 09:55 AM Re: Changing the Local Admin Password via KixTart
Geert Offline
Fresh Scripter

Registered: 2004-06-10
Posts: 5
@Bryce Tnx.

It works now. I thought I tried the Bracets yesterday before my post but probably I mistyped something.

To answer the other questions.

No it's not a part of the login script. It's a mass change that needs to be automated.

Yes the users are local admin on their machine.
Yes fellow IT'ers, I know and please don't start any conversation on this. I don't agree with it eighter :-)
Lecacy!

No I don't want to push the change towards the machines.
The users are local admin anyway so why bother.


Top
#121040 - 2004-06-11 12:16 PM Re: Changing the Local Admin Password via KixTart
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
because the password is in clear text in the script... a clever enough user (I know, there are no clever users) could find the script and read it.

doing it remotely, the computer would only have to be on.. no one has to be logged in... running it once a day a few times a week, for a while would get most PCs

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#121041 - 2004-06-12 02:07 PM Re: Changing the Local Admin Password via KixTart
Geert Offline
Fresh Scripter

Registered: 2004-06-10
Posts: 5
The user is local admin on the machine. If they want to login to the machine as administrator they can just reset the password and login.
I compiled the script and hung it in a GPO.
Thanx again!

Top
#121042 - 2004-06-12 03:40 PM Re: Changing the Local Admin Password via KixTart
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
that isn't what I meant... our users are admins on their own boxes as well, but not on the others.

So user A can break PC A, but not PC B

If the user can find the ladmin password, then they can get on any other PC and break it, or get into possibly confidential files on it (assuming they keep in the profile).

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#121043 - 2004-06-12 03:47 PM Re: Changing the Local Admin Password via KixTart
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

I compiled the script...



I highly doubt it since KiX is an interpreted language and cannot be compiled.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#121044 - 2004-06-13 07:48 PM Re: Changing the Local Admin Password via KixTart
Geert Offline
Fresh Scripter

Registered: 2004-06-10
Posts: 5
@Radimus, you are right but a user will still have local admin creds when a user logs into any other system, which results in full ctrl over the system regardless if he or she knows the loc admin passwrd.

@Les, you are probably right. I am not a programmer and wouldn't know the correct way of saying it. It would have been nice if you corrected me in the same post as you put your critizism.

Top
#121045 - 2004-06-13 08:10 PM Re: Changing the Local Admin Password via KixTart
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
We can't correct you if we don't even know what you did in the first place. Whenever you did was certainly not compiling the KiXtart script. Ang turning a script e.g. into an executable with e.g. the KiXscripts Editor is not compiling, it's packaging.
_________________________
There are two types of vessels, submarines and targets.

Top
#121046 - 2004-06-14 01:08 PM Re: Changing the Local Admin Password via KixTart
Geert Offline
Fresh Scripter

Registered: 2004-06-10
Posts: 5
Okay, thanx. So a kixscript can only be compiled into a Packaged? My script works and that is what I needed from this post. Thanks again everybody!
Top
#121047 - 2004-06-14 02:16 PM Re: Changing the Local Admin Password via KixTart
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Not natively no. However, there are a couple of 3rd party apps that can do it. One is KiXCrypt and the second is KiXscripts Editor. KiXCrypt is free and the editor is not.

Kent


Edited by kdyer (2004-06-14 02:16 PM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


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

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.098 seconds in which 0.055 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