[Samba] Add user script, with winbind, without PAM (Solaris 9)

Gerald (Jerry) Carter jerry at samba.org
Thu Jan 22 02:38:17 GMT 2004

Hash: SHA1

Paul Coray wrote:

> Fact is, on my still running production systen (Samba 
 > 2.2.8a on Solaris 9, Sparc) this works great. Each User
 > in our NT-PDC Domainuser database will get a home and
> a backupdirectory, when he connects to the Samba box 
> for the first time.
> [global]
>         workgroup = UB
>         netbios name = UB-FILES
>         server string = Home- and Backupserver
>         security = DOMAIN
>         encrypt passwords = Yes
>         map to guest = Bad User
>         show add printer wizard = No
>         password server = *
> ->        add user script = /opt/csw/samba/bin/add_user %u
> With Samba 3.0.1, this script never runs. In 
 > the documentation, I read that an add machine script is
 > needed in  order to have an add user
> script to be working. So I tried to add the line
> add machine script = /path/tothesame/adduserscript %u

The 'add machine script' is used to create machine trusts accounts
when running Samba as a PDC (which you are not in this case).

> So my only solution by now is to have a script I need to 
 > call _manually_ each time a new user is created on the PDC.
 > It just extracts the new usernames from the output of
 > wbinfo -u:

But if you are using winbindd then the user already exists
in UNIX.  The getpwnam() call for the DOMAIN\user will succeed
and so the 'add user script' will never be called.  This is by
design.  Do you run winbindd on the 2.2.8a server?

The better way to solve your problem is with a 'root preexec'
script of the share in question.

- --
cheers, jerry
  Hewlett-Packard            ------------------------- http://www.hp.com
  SAMBA Team                 ---------------------- http://www.samba.org
  GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
  "If we're adding to the noise, turn off this song" --Switchfoot (2003)
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the samba mailing list