Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

User Groups in Login Scripts

259 views
Skip to first unread message

Thomas Morgan

unread,
Oct 30, 2000, 1:50:23 PM10/30/00
to
Running NT4sp4

Is it possible to test for and/or utilize domain groups in NT login scripts?

I have several groups created in User Manager for our various departments
etc. (e.g. Backup Users, Accounting, Proxy Users, ...) and I would like to
be able to execute various tasks based on these groups from my login script.
For example...if member of proxy users then attach to network resource
1...etc...

This is a very common use of scripting under Netware but doesn't seem
possible with NT?!? Is their another way to accomplish this, possibly with
some other scripting tool available for NT?

Thanks,
Tom
tmorgan@_nospam_cgfns.org


Michael Harris

unread,
Oct 30, 2000, 1:53:25 PM10/30/00
to

Tino Donderwinkel

unread,
Oct 30, 2000, 1:56:30 PM10/30/00
to
If you want to do this, you should use Kix.
Kix is an easy to learn script language that is included in the WIndows NT
resource kit.
On the resources kit you can also find a short manual and some great
internet resources.

Tino Donderwinkel


"Thomas Morgan" <tmorgan...@cgfns.org> wrote in message
news:svrgnjj...@corp.supernews.com...

Jimmy Andersson

unread,
Oct 31, 2000, 12:22:06 PM10/31/00
to
You can use IFMEMBER from the Resource Kit to determine group membership.

Regards,
/Jimmy
--
Jimmy Andersson, Consultant
Microsoft MVP, MCP, CNTA, CCA


"Thomas Morgan" <tmorgan...@cgfns.org> wrote in message
news:svrgnjj...@corp.supernews.com...

John Facci

unread,
Oct 31, 2000, 5:58:45 PM10/31/00
to
I found IFMEMBER works well if you are an Administrator (or equivelent),
but fails (with 4 lines of errors) if you are a standard user.
I used the code below in a BAT file to determine if user had the rights to
install WSH (or run certain scripts).
Its messy (and doesn't detect if users is a member of Domain Admins) but it
works. SHOWMBRS is a resource kit utility.

:: IF NT then Check to see if User has local admin rights.
If Not (%OS%)==(Windows_NT) goto Rights
C:\NetUtils\showmbrs Administrators | Find "YourDomain\Domain Users" >nul
if errorlevel 1 GOTO TryUser
if errorlevel 0 GOTO Rights
:TryUser
C:\NetUtils\showmbrs Administrators | Find "%USERNAME%" >nul
if errorlevel 1 GOTO NoRights
if errorlevel 0 GOTO Rights

:Rights
:: Do Stuff Here

:NoRights
:: Log to file and exit.


Regards
John


"Jimmy Andersson" <ji...@mvps.org> wrote in message
news:uhD2i#1QAHA.256@cppssbbsa03...

Al Dunbar

unread,
Nov 1, 2000, 1:29:28 AM11/1/00
to
Hmmm... And if you want to use something as sophisticated as "local
variables" in your logon scripting system, or (scads of other things), how
would you do that in kix?

We are thinking of changing from kix to wsh, and this is not the only
"gotcha" that kixtart does no problem. One solution I have considered to the
"isingroup" thing is to create a directory on the DC called "isingroup"
permitted read to everyone and populate it with files like "Finance dept"
permitted ONLY to a group of that name. This would be wrapped in a function
(or method) called isingroup( groupname ).

Downsides:

1) maintenance chore with a large number of groups (we are looking at max a
dozen).

2) name of function would be more properly changed to
IsInGroupOrIsAnAdministratorAccount.

/Al

"Tino Donderwinkel" <ti...@tino.nl> wrote in message
news:8tkgan$2k37$1...@news.kabelfoon.nl...

Ricardo M. Urbano

unread,
Nov 1, 2000, 8:51:08 AM11/1/00
to
this the first time i've ever heard of a problem w/ ifmember. i and
others use it all the time.

Gary Dom

unread,
Nov 1, 2000, 9:00:19 AM11/1/00
to
I use ifmember in our logon script, and it works every time, for all users.

Gary
"Ricardo M. Urbano" <rm...@columbiaSPAM.SUCKSedu> wrote in message
news:3A001FCC...@columbiaSPAM.SUCKSedu...

John Facci

unread,
Nov 1, 2000, 6:37:08 PM11/1/00
to

This is the error message I get if I run ifmember as a standard user:

ifmember: GetTokenInformation failed.
Error code returned by system was 122.
More information about this error code can be obtained by
typing "NET HELPMSG xxx", where xxx is the error code above.

If I run imember as a Administrator its fine.
John

"Gary Dom" <gd...@nospam.pacbell.net> wrote in message
news:UlVL5.281$7a7.2...@news.pacbell.net...

0 new messages