#28373 - 2002-09-06 09:36 PM
Re: Making the current user a local admin
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I like this idea (which includes some from other ideas):
1. Create a global account. 2. Add the global account to the local administrators group (on the ghost image, perhaps?) 3. Add to logon scripts to remove local admin rights from all network accounts but Domain Admins after a set period of time after the install date (assuming you use sysprep prior to your image) (1 to 7 days?)
Brian
|
|
Top
|
|
|
|
#28378 - 2002-11-25 04:11 PM
Re: Making the current user a local admin
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Absolutely
Check out GrpMaint.exe on my web site.
|
|
Top
|
|
|
|
#28379 - 2002-11-25 04:12 PM
Re: Making the current user a local admin
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If you want to code it yourself using ADSI and KiXtart let us know. [ 25. November 2002, 16:12: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#28382 - 2002-11-27 12:04 AM
Re: Making the current user a local admin
|
JSchroeder
Fresh Scripter
Registered: 2002-06-24
Posts: 11
|
I have programmed a Server-Client Version for the Problem you are writing about.
First we have to get a List of Netbios-Names which have been logged on the Domain. Add following script into the netlogon :
quote: If @inwin="1"
If Open(3,"\\srv0017\logs$\needlocal.log",5)=0 $x=WriteLine( 3,@WKSTA+Chr(13)+Chr(10) ) Close(3)
Else Beep ? "konnte Log-Datei auf SRV0017 nicht öffnen" EndIf
EndIf
SRV0017 is my "logging"-Server ....
Then choose a Workstation which is doing a Batch-Job analysing the Log-File and doing a psexec on each remote Station :
quote: BREAK ON
;? "Checking Log-File"
IF Open(3, "\\srv0017\logs$\NEEDlocal.log")=0
$X= ReadLine(3)
While @ERROR=0 ? "WS-Nummer gelesen : "+$x
$go="psexec \\"+$x+" -u domain01\administrator -p password NET LOCALGROUP administratoren locadmin /ADD"
run $go
sleep 5
$go="psexec \\"+$x+" -u domain01\administrator -p password NET LOCALGROUP hauptbenutzer domänen-benutzer /ADD"
run $go sleep 5
$X= ReadLine(3) LOOP
WHILE CLOSE (3)><0
BEEP ? "ERROR CLOSING FILE" Sleep 3 LOOP
del "\\srv0017\logs$\needlocal.log" ? "Liste wird in 5 Minuten erneut bearbeitet ..."
ELSE
;? "Kann Log-Datei nicht öffnen - Keine Einträge vorhanden" ? "Liste wird in 5 Minuten erneut bearbeitet ..."
ENDIF
sleep 100
Goto starte
I created a global Group "locadmin" with all Persons who are allowed to have local admin rights (e.g. HelpDesk-Users). Then the Batch-File adds this global group to the local admin group, second "benutzer" from Domain are added to local hauptbenutzer (must be something like Mainuser and user in english ...8) )...
Script works perfekt in a 2000 Client Domain.
PSEXEC can be found with google.
Hope this is usefull ....
Greetings
J.Schröder [ 26. November 2002, 12:08: Message edited by: JSchroeder ]
|
|
Top
|
|
|
|
#28383 - 2002-11-26 02:38 PM
Re: Making the current user a local admin
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
To add the "domain\domain admins" group to the local administrators group on a remote workstation:code:
grpmaint.exe --add --sam \\computername --name administrators --member "domainname\domain admins"
to remove the group member: code:
grpmaint.exe --remove --sam \\computername --name administrators --member "domainname\domain admins"
You can also feed the program a list of computers. Substitute --SrvFile Filename for --sam \\computername
In the file list: quote: \\computer1 \\computer2 \\computer3
[ 26. November 2002, 14:42: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|