As part of the device mentioned here patching Samba 3.0 was required as well to achieve the same improvements with Samba as with Cups.
Installation
After downloading patch you may follow these steps for installation:
- Untar patch using
tar xzvf samba-auth_ext.tar.gz
then change to the create subfolder auth_extcd auth_ext
- Adjust included file Makefile fixing path pointing to source tree of Samba. The sources are available here.
- Create external module file by invoking
make
- Install created external module file by invoking
make install
If something is going wrong here, fix the path set in step 2 or copy file external.so manually.
Configuration
- Open configuration file of Samba for edit. In global section at beginning of file use of created module is enabled by inserting
auth methods = external
You may include internal authentication methods, too. Simply provide a list of methods separated by spaces to be processed from left to right until one is either granting or revoking access. - Furthermore you may define further options affecting the module:
- auth_external:script is selecting pathname of external script or binary to invoke on authentication requests.
- auth_external:user selects a user to run external script or binary as. This information is optional and by default the script is executed as the user the samba server is running as.
- auth_external:shell selects a shell to use as a successfully authenticated user's default shell. If omitted, /bin/sh is provided to Samba.
A full example would look like this:
auth methods = external
auth_external:script = /usr/bin/samba-ext-auth
auth_external:shell = /bin/false

