Page 1 of 1 1
Topic Options
#52705 - 2000-12-12 03:47 AM Admin Privledges during Logon
Anonymous
Unregistered


I've seen this posted before, but I missed the final solution. During my Script I need to add a Global Group with Domain User Privledges to the Local Admin Group on the desktops. How is this accomplished?
I have tried "addusers", "usrtogrp" and "munge". No combination of the above give me the script I need. Help anyone?

Top
#52706 - 2000-12-12 05:30 AM Re: Admin Privledges during Logon
Paul_Berquam Offline
Hey THIS is FUN

Registered: 2000-08-02
Posts: 310
Loc: Sacramento, CA USA
You could use the SU command to add admin rights for the user during the login. My biggest concern with doing something like this is that you have to put a user account/password in a clear text file.

I would personally look at doing something like this from a central admin workstation using some sort of batch method. I would recommend looking into a method that Microsoft recommends with Q180546

If you find a good KiX Solution I'm sure everyone here would like to check it out!

------------------

"He was a good little monkey and always very curious..."

_________________________
He was a good little monkey and always very curious...

Top
#52707 - 2000-12-12 05:31 AM Re: Admin Privledges during Logon
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
If you have a compleat list of NT computers that you need to make this change on, you could do it with an admin script.

By "admin script" i mean a script that you would run on a Domain Admin's computer, not during the logon process. The script would connect to and make changes on the remote NT workstations, taking advantage of the fact that it is being ran by a domain administrator.

I have a script that you can use as a frame work to create the connections to a list of target NT workstations, I will post it when i get to work in the morning (My current time is 10:42pm)

Also i highly recommend the NTSec software from http://www.pedestalsoftware.com/ntsec/..

Bryce

[This message has been edited by Bryce (edited 12 December 2000).]

Top
#52708 - 2000-12-12 04:30 PM Re: Admin Privledges during Logon
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
here is the admin_script frame that i was talking about.

code:

;
; This script will make an admin connection to the IPC$ share onto a
; list of Target computers. Once you have extablished an connection to the IPC$
; share, you then have full rights to do what ever you want with the targe computer.
;
; Change the "!!!!!place your code here!!!!!" to be your own code that will make the
; required changes on the target computer. this can be a simple cut-n-past of your
; own code, or you can do a CALL command to another kix script.
;
;
; Use the kix script ComputerList.kix to generate a list of all NT computers
; that are in the Domain.
; http://www.neosoft.com/~brycel/kix/other_scripts/Computer_List
;
; The computer list must be in a UNC format. You can provide a username
; and password for systems that that you don't have admin rights on
;
; \\computer1
; \\computer2,<username>,<password>
; \\computer3
; \\computer4
; ....
;-------------------------------------------------------------------------------

$computerlist = "clist.dat"

if open(1,"$computerlist",2) <> 0
? '"@serror" opening $computerlist'
? "You must provide a list of target computers for this script to work."
exit
endif

$temp = readline(1)
do
if instr("$temp",",") <> 0
$target = substr("$temp",1,instr("$temp",",")-1)
$targetname = substr("$target",3,len("$target"))
$temp = substr("$temp",len("$target")+2,len("$temp"))
$targetadmin = substr("$temp",1,instr("$temp",",")-1)
$targetpassword = substr("$temp",len("$targetadmin")+2,len("$temp"))
else
$target = rtrim(substr($temp,1,23))
$targetname = substr("$target",3,len("$target"))
$targetadmin = ""
$targetpassword = ""
endif


IF $targetadmin <> ""
use "$target\ipc$$" /user:'$targetname\$targetadmin' /password:$targetPassword
else
use "$target\ipc$$"
endif

Select
case @error = 0
? "____ $target _________________________________________________________________________"
;
;
;
; !!!!!place your code here!!!!!
;
;
;
case @error <> 0
? "____ $target _________________________________________________________________________"
? "Can't connect to $Target -OR- you have insufecent rights"
endselect

use "$target\ipc$$" /delete

$temp = readline(1)
until @error <> 0

exit



Bryce

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 884 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.05 seconds in which 0.022 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