Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there an easy way to have a samba user automatically created whenever a unix user is created? Currently I'm using LDAP. But it is not that easy, and also very difficult to setup. I'm looking for a simpler way.

share|improve this question
    
how do you create users? –  karthick87 Dec 11 '10 at 18:25
    
i use this command smbldap-useradd johndoe or the way how a normal unix user is created useradd johndoe. Both create samba users automatically, but, the second solution requires the user to first login as a unix user to get the samba user activated. –  nixnotwin Dec 12 '10 at 10:42
add comment

1 Answer

You can use "smbpasswd -a " to set the users password in the Samba database, without requiring them to log in.

It should be possible to create a simple wrapper script which calls both useradd and smbpasswd -a. Ideally useradd should just have integration for this and call smbpasswd -a for you (perhaps after you've set a configuration option), but we're not quite there yet.

share|improve this answer
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.