[Samba] ldap + samba + group membership problem
Paul Gienger
pgienger at ae-solutions.com
Thu Jun 17 18:13:56 GMT 2004
Matthew Koster wrote:
>>Now, in the "netlogon" global login script that I've made : SARTUP.BAT
>>I would like, to affect a drive letter for the user "joe" depending on his
>>"groups membership" so :
>>
>>net use D: \\servershare\docs (joe is group membership of "docs")
>>net use F: \\servershare\software (joe is group membership of "software"
>>
>>
>too)
>
>
>>...
>>
>>
>
>I got by this using the ifmember.exe distributed my Microsoft.
>
>By using the following syntax in the .bat I was able to map drives based on
>group
>
>@echo off
>ifmember docs
>if not errorlevel 1 goto group2
>net use D: \\servershare\docs
>group2:
>ifmember software
>if not errorlevel 1 goto group2
>net use F: \\servershare\software
>:quit
>
>If you do a search of ifmember.exe you'll find the install from MS, once
>you've installed it (default is something like c:\Program Files\Resource
>Kit) Copy the ifmember.exe to your windows directory...
>
>This was the easiest solution. takes a few seconds to install on a machine.
>
>
You can also just put the ifmember.exe on an available network location
and run it from there, that will save running around to all the client
computers.
Note: This will only tell you primary group, no auxilliary groups,
unless something has changed in samba 3 that I'm not aware of (haven't
rolled out 3 here yet)
Ex. output for me is like so:
N:\bin>ifmember /list
User is a member of group AEFGO\itserv.
User is a member of group \Everyone.
User is a member of group STORM\Debugger Users.
User is a member of group BUILTIN\Users.
User is a member of group BUILTIN\Administrators.
User is a member of group AEFGO\Domain Users.
User is a member of group AEFGO\Domain Admins.
User is a member of group \.
User is a member of group \LOCAL.
User is a member of group NT AUTHORITY\INTERACTIVE.
User is a member of group NT AUTHORITY\Authenticated Users.
You should see about 5 more groups listed for me that are secondary groups.
--
Paul Gienger Office: 701-281-1884
Applied Engineering Inc. Cell: 701-306-6254
Information Systems Consultant Fax: 701-281-1322
URL: www.ae-solutions.com mailto:pgienger at ae-solutions.com
More information about the samba
mailing list