[Samba] Mac OS X -- Unable to initgroups. on every anonymous
matisse at matisse.net
Fri Jul 26 20:04:02 GMT 2002
Hi Jay, thanks so much for your answer.
Mac OS X/Darwin is indeed different in that although it has an
/etc/group file that file is only used when the machine is in
single-user mode. Otherwise all the system routines that read user
and group info end up reading the netinfo database.
However, I believe that the kernel returns the proper answer for all
the group and user routines so the problem is not actually with
/etc/group or /etc/passwd (which do exist in any case and have the
entries needed for this user.)
So first let me say where everything works properly:
If I connect to a users' home directory share for example using:
smbclient //localhost/howard -U howard
Then everything works correctly. I've had people test this remotely
using Windows and it worked for them as well.
Here's where things do not work: Only when I access the 'public' share.
path = /tmp
read only = no
comment = Guest Area
guest ok = yes
(in the [global] section I have null passwords = yes
and I have tried various guest accounts)
Further more, no matter which user I connect to the 'public' share as
(even a user with a real password and using their password) when I
transfer a file to the Samba server the group ownership of the file
is not set properly, although no error appears in the log. (The files
are set owned by group 'wheel', presumably because smbd is running as
So any access to the 'public' share works, but the group ownership of
uploaded files is always wrong, and, if you connect anonymously (by
not supplying a password) you get in, but there is an error message
in the log.
So all three of these get you in:
# smbclient //localhost/public password -U howard
# smbclient //localhost/public -U howard
# smbclient //localhost/public
The first one gives no error in the log file, the second do give the error
[2002/07/26 20:00:29, 0] smbd/sec_ctx.c:initialise_groups(229)
Unable to initgroups. Error was Input/output error
At 6:07 PM -0700 2002/07/26, Jay Ts wrote:
>> I'm using Samba 2.2.5 on Mac OS X 10.1.5
>> Connecting to the share "public" with no username or password works
>> fine, but, this error message appears in the log every time:
>> [2002/07/26 15:15:54, 0] smbd/sec_ctx.c:initialise_groups(229)
>> Unable to initgroups. Error was Input/output error
>> What am I doing wrong?
>The error is caused when Samba calls the C library's initgroups()
>function, and it runs into some kind of trouble. initgroups()
>needs to read /etc/group. Did you make sure the account you are
>using as your guest account exists? And is in a group that exists
>in the system?
>Make sure you have a /etc/group file and that it is non-corrupt,
>and readable. The "Input/output error" suggests (?) that there might
>be something wrong with the file.
>(BTW, I'm using Linux here, so I hope OS X isn't too far different.
>Try reading the initgroups(3) manual page on your system to check.)
>author, Using Samba, 2nd edition
matisse at matisse.net
More information about the samba