[Samba] Broken pipe when using ssh with pam_smbpass.so migrate

Simon Nagl simonnagl at aim.com
Thu Mar 3 17:40:50 UTC 2016

As Mathias suggested:

samba 4.3.5-1
pam 1.2.1-3
linux-sun7i 3.4.90-4
openssh 7.2p1-1

#### /etc/samba/smb.conf
workgroup = WORKGROUP
netbios name = NAS
security = user
# I also tried encrypt password = no
encrypt passwords = yes

path = /data/%u

There is no complex configuration.

> Am 03.03.2016 um 17:38 schrieb mathias dufresne <infractory at gmail.com>:
> Hi Simon,
> I never played with Samba in the way you are playing with.
> Anyway your issue seems to be very located to pam_smbpass.so or its usage. Bug from software or admin mistake? As said, I have no idea but perhaps if you post Samba version, pam version, smb.conf perhaps too... anything to be more specific about what is really your installation. This could help those who have played with that to help you.
> Cheers,
> mathias
> 2016-03-03 14:29 GMT+01:00 Simon Nagl <simonnagl at aim.com>:
> Hello,
> I am trying to keep my samba accounts in sync with my unix accounts.
> I want to login ssh.
> Syncing passwords works.
> Scenario: I create a new user:
> useradd -m testuser
> passwd testuser
> When I log in with the user pam_smbpass should create a corresponding samba user.
> I modified system-auth which is included in sshd:
> #### /etc/pam.d/system-auth
> auth     requisite pam_unix.so     try_first_pass nullok
> auth      optional  pam_permit.so
> auth      required  pam_env.so
> auth      optional  pam_smbpass.so  migrate
> account   required  pam_unix.so
> account   optional  pam_permit.so
> account   required  pam_time.so
> password  requisite pam_unix.so     try_first_pass nullok sha512 shadow
> password  optional  pam_smbpass.so  try_first_pass nollok
> password  optional  pam_permit.so
> session   required  pam_limits.so
> session   required  pam_unix.so
> session   optional  pam_permit.so
> Now if I try to login with testuser user via ssh I get this error message:
> packet_write_wait: Connection to 192.168.xxx.xxx: Broken pipe
> If I log in with any other user I get the same message.
> If I uncomment the line
> auth    optional    pam_smbpass.so    migrate
> and try to login again it works. Also a samba account for testuser has been created.
> Does anyone have a solution how this can be fixed?
> Simon
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list