cli_samr_add_aliasmem on SOLARIS query
hugo at aardvarks-and-platypus.com
Sun Nov 27 18:26:33 GMT 2005
I'm not having too much luck over on the general samba list, however, this
is a technical question on the internals on Samba.
A little back ground:
1) I'm not a programmer so excuse me if what I'm saying is rather stupid
2) I'm running Samba-3 (I've tried various versions and they all exhibit
the same problem) on Solaris 8
3) I have used both Sun C compiler v5.1 and GCC 3.4.2 to compile samba.
4) I'm predominately using Samba-3.0.20b (tried 11,14 and 18).
5) I may be missing something about how LOCAL groups work under Samba.
6) I am using the most simplest of configurations from the official HOWTO.
The reason I'm posting and rummaging through the source code:
I have found when trying to add users to either Local groups or Domain
groups things do not work properly. I have tried using MMC from a WIndows
machine and the "net rpc group" command from the same Solaris machine
For LOCAL groups the UNIX script pointed to in the smb.conf file with the
"add user to group script" is *never* *ever* called.
For Domain groups the UNIX script pointed to by the "add user to group
script" is called however the "net rpc group..." returns a
NT_STATUS_GROUP_NOT_IN_GROUP type error.
(NOTE: The script that adds users to groups used in UNIX, works from the
shell. The script is fine basically).
What I have found rummaging about in the Samba Source code:
1) The samba configure script incorrectly identifies the system in part as
a TRU64 system (rather than Solaris) and defines BROKEN_GETGRNAM. As
BROKEN_GETGRNAM is defined the wrong code is called in get_users_in_group
(lib/util_getent.c). This is why things malfunction when adding users to
2) A completely different execution path appears to be followed when
adding to LOCAL groups - which brings me to the cli_samr_add_aliasmem
What I am having trouble with (and need help with):
1) Trying to understand LOCAL groups..why are they simply treated as an
alias. In my naivety this suggests to me that they are not real.
2) Also trying to locate the code within the server portion of samba that
handles LOCAL groups, I've found the code in the client side but I'm
really struggling. As I say not being a programmer I find it slow going so
would really appreciate some help. I am hoping that it will be relatively
trivial to either call the code for smb_add_user_group() or activate it.
3) Trying to figure out why I seem to be the only person to have noticed
that Samba doesn't work on Solaris - well that's my interpretation. In
it's current state I cannot even get a minimal (trivial) installation of
Samba working. Not being able to add groups is a pretty major problem in
The main reason I mention 3 (above) is just that a large part of me thinks
I must be missing something, doing something wrong or misreading the HOWTO
in a major way. However, all the evidence I can find says the opposite.
Unfortunately, I'm now at the stage where I've wasted so much time on this
that I cannot really justify any more time (well any more of the clients
time). If someone says that "Oh well, it's a known fault Samba-3 on
Solaris doesn't really work as we only focus on Linux" then that's fine
and I'll gladly look for another solution. Surely not though!? Is there a
work around for the adding users to groups problem on SOlaris?! Are there
patches that I have failed to find?
If someone could point me to the function within the Samba server (smbd)
that deals with adding users to LOCAL groups then I'll spend a little more
time trying to get it calling the script to properly add users to groups
More information about the samba-technical