Koozali.org: home of the SME Server

Primary Groups and Netlogon.bat

Willem Fokkens

Primary Groups and Netlogon.bat
« on: May 14, 2003, 03:59:15 PM »
I have created a network with e-smith and samba.

My users are divided in groups. Every group have their own loginscript.

The loginscript configuration in smb.conf =

logon path = \%L\netlogon
logon script = %G.bat

My problem is that the group that i have made on the server-manager is not the primary group of the user. The primary group of the user is a group with the name of the user.

Example:

I have created a group called "test_afd"
I have created a user called "testgeb"

So my idea is that the user "testgeb" gets the login script "test_afd.bat", but instead of this samba picks his primary group wich is the group "testgeb".

When i give the commando "id" in the console the result is:

uid=5080(testgeb) gid=5080(testgeb) groups=5080(testgeb), 500(shared), 5079(test_afd)

You can see that the group "test_afd" is the 3th group, not the 1st.

What can i do about this?

Jochen Hoegerl

Re: Primary Groups and Netlogon.bat
« Reply #1 on: May 14, 2003, 06:54:06 PM »
Hi,
instead of using a couple of different login-scripts, you can use "ifmember.exe" and just one login-script.

You can get ifmember.exe here.....

http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp


And here is an article describing the use / systax of it.

http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5869&pg=1&show=1053

hope this helps

jochen

Thierry

Re: Primary Groups and Netlogon.bat
« Reply #2 on: June 16, 2003, 02:52:10 PM »
Hi,
I tested, but IFMEMBER.EXE don't work with groups other than "primary group"
Why ?

(for the moment the only solution that I found, it is to change the primary group of the user. I added a check box on Web manager to choose the primary group)