Trouble Accessing Samba with New LDAP User

0
4
Asked By TechieNinja42 On

Hey everyone! I'm trying to understand how to get my new LDAP user to work with Samba. I have an LDAP server at 192.168.1.10 and a Samba server at 192.168.1.3. I'm sharing two folders: one called 'install' that anyone can access, and another called 'admin' that only users in the sysadmins group can access. I created a user named 'potato' on the LDAP server, but when I try to use it on the Samba server, it doesn't show up at all. I can log in with 'tomato', an existing user, without issues, but 'potato' isn't recognized. I've checked with `getent passwd` and it shows nothing, while `getent shadow` lists both users. I also get this error when trying to mount the shared folders: 'Failed to find a Unix account for potato'. I ran `pdbedit -L -u potato` and it says it can't find the user. They should be similar since they're both in the sysadmins group. Did I miss a step to link a local Unix Samba account to the LDAP one? Any help would be appreciated!

3 Answers

Answered By Linux Lover 99 On

Are you still using a traditional NT4-style domain setup for Samba? If so, it can be a bit tricky with LDAP. Using Samba in an Active Directory (AD) setup would simplify things and provide better management of users. However, if changing isn't an option, I recommend verifying that all required Samba and LDAP services are properly running and talk to your LDAP admin to ensure everything is in sync. They might need to check if 'potato' is assigned correctly in the LDAP directory.

Answered By CommandLineGeek On

Since 'potato' shows up in `getent shadow`, it suggests the account does exist, but may not be fully integrated into the Samba user database. You might need to run `smbpasswd -a potato` to add it to Samba explicitly. This command can help tie the LDAP user to Samba's password database, making it recognized on the Samba side.

Answered By SambaSage88 On

It looks like your Samba server might not be properly synchronizing the LDAP user information. One possible issue is the way your Samba is configured to handle user accounts. You can check if 'potato' is in your LDAP and whether it has the same attributes as 'tomato'. Also, ensure that your Samba configuration specifies the correct LDAP settings in the smb.conf file. It's possible that it needs to cache or preload the LDAP users before they can log in. Lastly, running `testparm` on your Samba server can reveal configuration warnings that might help.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.