this may be an easy one for the samba pros out there: I have an archlinux box up and running as an samba 4 AD which works as expected. I want to add an user to the samba which lead me to 2 different solutions:

  • Creating a samba only user with samba-tool user add USERNAME
  • Creating a samba user from a unix user using smbpasswd -a <username>

I tried it both ways but the user created has a different user id (generic/numeric username) and doesn't match the unix user, which leads to complications concerning the file permissions.

Is there a way to create "matching" user? Or am I totally missing the point?

  • I found this one: informatik-aktuell.de/betrieb/server/… (sorry it's german), this article explains how to change the user ids for the samba users to the unix users. Is'nt there any way to create the samba users based on the unix users or do I have to change every users id after the user creation? – chrstnwhlrt Jul 6 '16 at 14:23

Yes, Samba users and Linux users are distinguishable.

Linux user are authenticated through PAM. File is something like /etc/pam.d/login or /etc/pam.d/system-auth depending upon your distribution.

Instead, samba users are authenticated following the winbind deamon. There are authenticated against the domain which can be read in /etc/smb/samba.conf . If a user is authenticated by samba and that such Unix user exists, it is mapped to this user else to nobody by default.

To acceess to a file a user must be mapped to a user which have access to the file and also have access to the shared file in Samba. There is two layers of security.

May also be usefull https://ubuntuforums.org/showthread.php?t=1949199

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.