Page 1 of 1 1
Topic Options
#133757 - 2005-02-14 09:58 PM using a windows group with @wksta
Jeff_C Offline
Lurker

Registered: 2005-02-14
Posts: 1
Hi all,

I have to change my login script so I can support laptops and workstation for users the way I would like to do it is to build a list of workstation names (not users) in a group so when a user login, it will look if he's in group "laptop" to see if his computer is the workstation or the laptop (depending one or the other, i have special commands to execute.)

i'm looking something like :

if ingroup("laptop") = @wksta then
do stuff
else
do some other stuff
fi

any idea on how to do this ?

thanks

Jeff C.

Top
#133758 - 2005-02-14 10:13 PM Re: using a windows group with @wksta
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA

You can not use ingroup. This has been discussed on the board many times. So much that a UDF was written to accomplish this task.

ComputerInGroup() - returns if the PC is a member of a specified group
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#133759 - 2005-02-14 10:31 PM Re: using a windows group with @wksta
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You could also forego the group part and organize them in different OUs. There are UDFs for that too.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#133760 - 2005-02-16 08:23 PM Re: using a windows group with @wksta
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Quote:


if ingroup("laptop") = @wksta then





This will never work because if ingroup("laptop") will never be the same as @wksta. And InGroup() only works on users not on computers.
Like said there are udf's to check on OU membership, I think this is the way to go.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#133761 - 2005-02-16 08:38 PM Re: using a windows group with @wksta
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I prefer using the OU structure rather than group membership. You have to put a computer in an OU but group membership is not compulsory. Depending on what you are trying to acheive though, OU structuring might not always make sense.

I generally use an OU structure cuz that is what GPOs are modelled after. Groups and ACLs can then be used for more granularity. The UDF I use is Howard's InContainer().
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.068 seconds in which 0.04 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