samba digest, Vol 1 #266 - 30 msgs

Frederic Gilbert Frederic.Gilbert at inria.fr
Fri Jan 26 08:18:41 GMT 2001


Hello,

> I've played with a thought of joining a Samba servers (one TNG box and
> several 2.x.x boxes) to AFS file system. I'd be very happy to hear
> experiences of having Samba and AFS together and any helpful links
> (Google didn't return anything interesting) are greatly appreciated.

I succeeded in making an AFS client also a samba server, to that it
provides AFS authentication and AFS filesystem sharing.

> 
> The questions are:
> 
>     1. What are the requirements and suggested steps in migrating Samba
>     and AFS?
>     2. How the authentication of users would be done?

The authentication is done through AFS/kerberos routines (use of
ka_UserAuthenticateGeneral() routine).

>     3. What is the status of AFS support in Samba?
> 

What is supported:
you can do a "./configure --with-afs"; this enables the flag in config.h
that will connect the kerberos authentication function to the samba
session opening.

What is not supported:
- you have to find and add manually afs libraries in the makefile (which
was quite painful for me, as some AFS calls are defined in several .a
files);
- configure fails to correctly detect locking mode on AFS filesystems,
so that you have to add -DHAVE_FCNTL_LOCK to the cflags in the makefile;
- there is some mismatch between rpc definitions found in samba .h files
and those found in /usr/include/*.h files.

To solve the two latter points, you can try applying the following patch
to the Makefile.in (the 2.0.7 one), before running configure (perhaps
you will have to work around RPC and fcntl_lock flags, as at a point I
stopped compiling to Linux to finally use a Solaris box): 

9a10,21
> AFS_BASE = /usr/afsws
> RPC_FLAGS = -D__XDR_INCLUDE__
> AFS_LINUX_FLAGS = -DHAVE_FCNTL_LOCK
> AFS_ARCH_FLAGS = $(AFS_LINUX_FLAGS)
> AFS_FLAGS = -I$(AFS_BASE)/include $(RPC_FLAGS) \
>           $(AFS_ARCH_FLAGS)
> AFS_LIBDIR = $(AFS_BASE)/lib
> AFS_LINUX_LIBS = -L$(AFS_LIBDIR) -L$(AFS_LIBDIR)/afs -lafsauthent \
>            -lafsrpc -lpthread
> AFS_LIBS=$(AFS_LINUX_LIBS)
> 
> 
12c24
< CFLAGS=@CFLAGS@
---
> CFLAGS=@CFLAGS@ $(AFS_FLAGS)
360c372
<       @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
---
>       @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) $(AFS_LIBS)
368c380
<       @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) 
---
>       @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) $(AFS_LIBS)
376c388
<       @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(LIBS)
---
>       @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(LIBS) $(AFS_LIBS)
412c424
<       @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS)
---
>       @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS) $(AFS_LIBS)


Good luck,
Fred.

--------------------------------------------------------------------
Frederic GILBERT                           Frederic.Gilbert at inria.fr
INRIA Rocquencourt / SIR
Domaine de Voluceau                        Tel: +33 (0)1 39 63 57 85
BP 105, 78153 LE CHESNAY, FRANCE           Fax: +33 (0)1 39 63 55 96
--------------------------------------------------------------------




More information about the samba mailing list