OS/2, eCS & ArcaOS - Technical > Networking

Samba groups are broken

<< < (2/2)

Paul Smedley:
Check \etc\pwd.db & \etc\spwd.db - as I recall - these are the actual files used by libc to determine valid users/groups. master.passwd & group are just the human readable files that can be edited.

Doug Clark:
Thanks Dave and Paul for your help.

I copied over the group and password files from the working ECS machine to the new AOS machine.  I can see the groups from the AOS machine in the Groups tab of the Local Samba Users and Groups application, so I know it is using the file I copied over.  But I still get the message
"Samba groups are broken, only 0 instead of 9 groups found"

When I select an entry in the Groups tab/page and click on Delete I get the message
"Lookup of 'Domain Enterprise Admins' failed
which is the group I selected to delete

If I try to add a new group I get the message
"Failed to add group 'NewTestGrp' with error: Access is denied"
and then
"Samba groups are broken, only 0 instead of 9 groups found"

'NewTestGrp' is the one I tried to add.

I can successully unmap a group without an error message.

The good news, for me at least, is that even though I get these error messages about the groups, I can still connect to the new Samba server running on AOS from other Windows machines (haven't tried connecting from any Macs yet)  So my workaround is making user/group changes on the ECS machine and copying the files to the AOS machine.  That probably is not a viable solution for Neil.

For anyone else installing the Samba server, I offer these suggestions.

1) For AOS users there is a Selective Install for Networking in the System - Install/Remove - folder.  Try that first.

Since I did not know that existed I installed samba.wpi from CID/serversamba.

If you install that it will complain about missing runtime libraries (Chris Wohlgemuth's and Dave Bolls, among others).
Those are contained in the file rxlib4smb.wpi.  However my version of that file installed the libraries in C:\ECS\DLL
Which is OK I guess as long as C:\ECS is on the libpath, but AOS users will probably want to copy the stuff rom C:\ECS to C:\SYS

Again - thanks Paul and Dave for your suggestions.  At least I now have a process for updating users and groups - clunky as that is.

Neil Waldhauer:
I am also using password files I created on eCS.

I found that almost all of the user and groups commands will fail.

smbpasswd.exe is called for many user create, edit and delete functions from Samba Users and Groups.

Things work better if I edit smb.conf and change some of the lines to use forward slashes instead of backward slashes.


--- Code: --- add user script = E:/Programs/samba/usermod.cmd -a "%u"
rename user script = E:/Programs/samba/usermod.cmd -r "%uold" "%unew"
delete user script = E:/Programs/samba/usermod.cmd -x "%u"
add group script = E:/Programs/samba/groupmod.cmd -a "%g"
delete group script = E:/Programs/samba/groupmod.cmd -x "%g"
add user to group script = E:/Programs/samba/groupmod.cmd -j "%g" "%u"
delete user from group script = E:/Programs/samba/groupmod.cmd -l "%g" "%u"
set primary group script = E:/Programs/samba/usermod.cmd -p "%u" "%g"
add machine script = E:/Programs/samba/usermod.cmd -a "%u"

--- End code ---

This should not be needed, of course. And groups still doesn't work. Maybe the answer is to move some functions back to an eCS virtual machine.

Steven Levine:
If you want to debug this on your system, here are a couple of ideas in case you have not already tried them.

If you grab a copy of the smbusers sources from

  http://svn.netlabs.org/repos/samba/trunk/guitools/smbusers

you might find it easier to follow the code path

The message

  Samba groups are broken, only 0 instead of 9 groups found

is defined at

  guitools\smbusers\rc\lang\smbusers_en.mkm:129
  SMU0112I: Samba groups are broken, only %1 instead of %2 groups found.

and generated for display at

guitools\smbusers\SMBUSERS.VRX:1278
        Msg.Text = NLVGetMessage(112, gline.0, gname.0)

The 0 in gline.0 is the result of the output of the net rpc command invoked at:

guitools\smbusers\SMBUSERS.VRX:1231
    address cmd samba.!netexe' rpc group -l 'DebugLevel' 'UserCred' 1>'grouplistf' 2>'samba.!error

The code that follows parses the content of the "grouplistf" file and sets gline.0

The grouplistf file name is defined at

guitools\smbusers\SMBUSERS.VRX:1227
    grouplistf = TempDir'netgrouplist.txt'

The content of this file might give you some ideas as to what is not working correctly.  You are either getting no output from the net rpc command or output that the code does not understand.

If the file content is not helpful, mapping

    address cmd samba.!netexe' rpc group -l 'DebugLevel' 'UserCred' 1>'grouplistf' 2>'samba.!error

to something you can run from the command line might give you some useful information.  You can start with

  net rpc group -l

and add options as you go.

The samba.!error file might also contain some useful info.  The file is generated by:

guitools\shared\cltinit.vrs:205
    samba.!error = SysTempFileName(TempDir'smb_err.???')

so look for the newest smb_err.* file in your temp directory.

Navigation

[0] Message Index

[*] Previous page

Go to full version