Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a samba server and just installed the second one to configure a reserve file server.

It all went well and both of them successfully are on Active Directory domain (actually SAMBA 4)

the problem is that on the server 2 user shares messed with wrong uid/gids.

and if I id user1 on server 1 I get 2010 but but I run id user1 on server 2 I get 2031

They use 99% identical smb.conf

and they have: passdb backend = tdbsam

I have found out that in order to achieve equal UID/GID's I would need to use ldapsam but I don't know how to do it.

Do I need to first export from tdbsam and then install ldap server on server 1 export to that ldap server?

and then set passdb backend to ldapsam on both?

share|improve this question
add comment

1 Answer

You could export samba's users on the first server an import them on the next with pdbedit:

pdbedit -e tdbsam:/tmp/tdbsam.bak

and scp or rsync the file to the second server and on the second server:

pdbedit -i tdbsam:/tmp/tdbsam.bak

or import them from tdbsam (the local file) to ldapsam:

pdbedit -i tdbsam:/tmp/tdbsam.bak -e ldapsam:ldap://127.0.0.1

Edit: I just saw this is an onl question... well if somebody still needs this.

share|improve this answer
    
Thank you for your answer. Almost one year have passed and I am going to test soon. Hopefully I will mark it as accepted. –  bakytn Jan 26 '13 at 17:53
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.