Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
29
rated 0 times [  29] [ 0]  / answers: 1 / hits: 107169  / 2 Years ago, mon, july 18, 2022, 8:50:52

Is it possible to tie your login password to your samba password?



Ideally every 30 days, users need to change their passwords to login into the machine and if its possible, when they update their password, it'll also update the samba password.


More From » 12.04

 Answers
2

I believe Samba is configured like that by default, here are the relevant lines in smb.conf:



# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
security = user


...



# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes


More info on these options and more here. Hope that helps.



EDIT:



The first time you add a linux user (adduser) you need to add them to smbpasswd as well.



sudo smbpasswd -a <user>



when prompted for a password use the same password you used with adduser. After this the smb password should be updated automatically when you change the linux password with sudo passwd <user>


[#37416] Wednesday, July 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heathree

Total Points: 157
Total Questions: 132
Total Answers: 108

Location: Honduras
Member since Mon, Apr 5, 2021
3 Years ago
;