[Samba] libsmbclient in Mac OS X / Darwin

Luis Muñoz lem at cantv.net
Sun Oct 27 05:32:01 GMT 2002


At 3:34 AM +0000 10/27/02, John H Terpstra wrote:
>On Sun, 27 Oct 2002, Andrew Bartlett wrote:
>
>> Luis MuÒoz wrote:
>> >
>> > Actually, I don't think this is helpful.
>> >
>> > smbd fails when trying to service a non-root user because it cannot change
>> > its credentials back and forth. Unfortunately, I have very little time to
>> > help make this run in Mac OS X. Do you have any suggestion?
>>
>> Without access to OSX test hardware, no.  But Apple does ship Samba, so
>> it must work somehow...
>
>Ah, but it is not complete. SWAT is there, but none of the files from
>/usr/share/swat are on the system. SWAT is not enabled in inetd.conf. OSX
>does not use /etc/passwd as a Unix user would expect. Essentially, Apple
>do a minimal share arrangement with samba. Have fun trying to make it all
>work. ;)

Yep. Apple provides a small fraction of samba along with OS X. I suspect OS
X _Server_ is another story, but I don't have access to it.

>PS: I do not have a MAc with OSX, this info was gleaned from trying to
>help someone get samba working properly. We got SWAT working by copying
>all the /usr/share/swat stuff off a Linux system. But the rest - could do
>with a bit of work. It would be good if we can work with Apple to get the
>wrinkles ironed out.

Well, I was unable to make smbd work. When I tried to 'smbclient -L
127.0.0.1' with a non-root user, smbd was unable to change its gid.
'smbclient -L 127.0.0.1 -Uroot' worked fine (as smbd didn't need to change
its gid).

In case you guys wonder, this is an actual session:

+-----------------------------------------------------------------------+
|                               Server Window                           |
+-----------------------------------------------------------------------+
| lem at dC8541540 lem> su -
| Password:
| [dc8541540:~] root# smbd -i
| smbd version 2.2.6 started.
| Copyright Andrew Tridgell and the Samba Team 1992-2002
| Failed to set gid privileges to (0,20) now set to (20,20) uid=(0,0)
| PANIC: failed to set gid
|

Abort

Meanwhile...

+-----------------------------------------------------------------------+
|                               Client Window                           |
+-----------------------------------------------------------------------+
| lem at dC8541540 lem> smbclient -L 127.0.0.1
| added interface ip=200.84.21.64 bcast=255.255.255.255 nmask=0.0.0.0
| Password:
| session setup failed: Call returned zero bytes (EOF)
|

My user (lem) has uid 501, gid 20. Root has, of course, uid 0, gid 0 (with
some other gids too).

If you're interested, I can apply patches or fetch from CVS. I cannot
provide shell access as my machine is actually a laptop and I have to move
quite often.

Regards.

-lem


-- 
 --
#!/usr/bin/perl -w
use strict;
$_[$_]=0 for 0..7;my$i;
for my$a(grep{s@^00@@}unpack'B8'x28,join'',map{chr}split/\*+/,q{61*31*28*
32*20*40*25*63*63*9*52*58*49*18*30*47*20*2*10*4*8*63*63*1*36*2*13*30}){$i
=0;grep{$_[$i++].=$_}split //,$a;length$_[0]==8&&print pack'B8',$_ for at _;
length$_[0]==8&&grep{$_=0}@_;}print"\n";



More information about the samba-technical mailing list