Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've heard that samba stores passwords in a less safe way than the normal linux passwords.

Is this true? If yes, what can I do about it?

share|improve this question
add comment

1 Answer

Samba can authenticate in a number of ways but in a stand-alone situation I expect is most commonly configured to authenticate against hashes of passwords, the hashes being stored in /etc/passwd or (more usually nowadays) in the shadow password file.

The person who you heard this from may have been confusing storage with transmission.

Passwords can be sent to the Samba server in either an encrypted or a nonencrypted format. If you have both types of systems on your network, you should ensure that the passwords represented by each user are stored both in a traditional account database and Samba's encrypted password database. This way, authorized users can gain access to their shares from any type of client.[1] However, we recommend that you move your system to encrypted passwords and abandon nonencrypted passwords if security is an issue

http://www.samba.org/samba/docs/using_samba/ch09.html


EDIT:

I recall (but cant find the references right now) that the main factor causing this issue was the way Windows clients authenticate. They require the server to know the password. This is unlike other authentication systems where the server only needs a hash or a public key and where therefore it is not possible to retrieve a password (or equivalent login credentials) from data stored on the server.

Samba can also authenticate against Kerberos or LDAP servers. So there is plenty of scope for setting up a secure system.

The Register has an interesting article on NTLMV2.


EDIT2:

Actually NTLMV2 doesnt require the authenticating server to know the password - according to this Miicrosoft article.

share|improve this answer
    
The old Samba systems I worked with way back in the day only supported cleartext share/username/password combos. It was ugly! Not so nowadays. –  Brian Knoblauch Oct 28 '10 at 12:38
    
Samba can also use it's own password file - samba.org/samba/docs/man/manpages-3/smbpasswd.5.html - using LANMAN or NTML hashes –  Cry Havok Oct 28 '10 at 13:47
    
As far as I can tell not using a separate smbpasswd file (which stores the passwords using a weak hash) requires the client to transfer the password in clear text. lists.samba.org/archive/samba/2004-August/091168.html Is that e-mail still correct? –  Georg Schölly Oct 28 '10 at 17:00
    
Samba can refer the authentication to a separate server (e.g. a Windows domain controller) in which case no passwords are stored anywhere by Samba or on the Samba server and I believe no passwords need be sent in clear text over the network. –  RedGrittyBrick Oct 28 '10 at 17:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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