Page 1 of 1 1
Topic Options
#173635 - 2007-02-05 12:01 PM Privilege
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
In my script i have the @priv command to request the Privilege for the user.
I work in a domain and most users are Administrator localy.
Still he says im guest while logging in.

How come ?
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#173636 - 2007-02-05 12:28 PM Re: Privilege [Re: Phoenix1987]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Maybe you can check if the user is in
@WKSTA + "\Administrators"
(Did not test this, just a guess)
 Code:
If InGroup(@WKSTA + "\Administrators")
	;Do Stuff
EndIf


Edited by Witto (2007-02-05 12:36 PM)

Top
#173637 - 2007-02-05 12:37 PM Re: Privilege [Re: Witto]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
@wksta results the computername

edit on your edit.
:P

Ok gonna try that after lunch \:D

EDIT2:

Lunch was delayed...

it doest work \:\(


Edited by Phoenix1987 (2007-02-05 12:40 PM)
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#173638 - 2007-02-05 01:32 PM Re: Privilege [Re: Phoenix1987]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
How about this UDF

LocalAdmin() - checks for membership of local admin group


Edited by Mart (2007-02-05 01:37 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#173639 - 2007-02-05 02:00 PM Re: Privilege [Re: Mart]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
Hey that works :P

thanks mate \:\)
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#173640 - 2007-02-05 02:02 PM Re: Privilege [Re: Phoenix1987]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
Ow but still i have the question how to fix the @priv

why that doesnt work :P
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#173641 - 2007-02-05 02:16 PM Re: Privilege [Re: Phoenix1987]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I presume that @priv will show what the user is towards the domain.
BTW, tested my suggestion and as far as I can see, it works, if
- OS = English
- OS = NT (no 9x)
- Administrators group has NOT been renamed
The LocalAdmin() UDF will resolve these issues.
But pay attention to the fact that the LocalAdmin() UDF is NOT NoVarsInStrings compliant.
Change it to
 Code:
Function LocalAdmin()
	$LocalAdmin=InGroup(@wksta+'\'+SIDToName('S-1-5-32-544'))-1+@inwin
EndFunction

Top
#173643 - 2007-02-05 02:44 PM Re: Privilege [Re: Phoenix1987]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Phoenix1987
Ow but still i have the question how to fix the @priv

why that doesnt work :P


@priv does works as expected. Like Witto says @PRIV shows the privileges the user has on the domain and not on the local computer. There is no way to "fix" @priv to show the local privileges because the behaviour of @priv is specified in the source of kix32.exe or wkix32.exe. Why do you think the UDF was created


Edited by Mart (2007-02-05 02:53 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#173645 - 2007-02-05 03:48 PM Re: Privilege [Re: Mart]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: Mart
@priv does works as expected.
Not really, in this case it works as designed. The OP "expected" it to work otherwise. \:\/
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#173646 - 2007-02-05 03:59 PM Re: Privilege [Re: Les]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Les
 Originally Posted By: Mart
@priv does works as expected.
Not really, in this case it works as designed. The OP "expected" it to work otherwise. \:\/


LOL Yep. My bad it works as desinged.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#173647 - 2007-02-05 04:04 PM Re: Privilege [Re: Mart]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
 Originally Posted By: Mart
 Originally Posted By: Les
 Originally Posted By: Mart
@priv does works as expected.
Not really, in this case it works as designed. The OP "expected" it to work otherwise. \:\/


LOL Yep. My bad it works as desinged.


-_-" ok thanks anyway \:D
_________________________
A mistake is Human, But to make it a real mess you need a computer.

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
0 registered and 1003 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.063 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

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