LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2004, 06:00 AM   #1
barkers
Member
 
Registered: Apr 2002
Distribution: Debian
Posts: 50

Rep: Reputation: 15
Samba & LDAP problem


Hi,

I'm a newbie at linux networking and am a bit lost.

I'm having a problem with loging in as a certain user from an XP machine to a samba share.

Our prvious sysadmin (he left and the sysadmin is now me) setup samba & ldap & PAM and it all works.
we use phpldapadmin to manage LDAP.
all our users are stored in LDAP but one of them cant access samba shares, it doesnt recognise the user&passwd.

I suspect the user is not setup as a samba user.

I've been diggin around the net (and these forums) for quite a while and i found somewhere that said you add samba ldap users by doing

smbpasswd -a barclayc

as root.

I have tried this but this is the output:

New SMB password:
Retype new SMB password:
ldapsam_modify_entry: Failed to modify user dn= uid=barclayc,ou=People,dc=webteam,dc=nexusmedia,dc=com with: Insufficient access

ldapsam_update_sam_account: failed to modify user with uid = barclayc, error: (Success)
Failed to modify entry for user barclayc.
Failed to modify password entry for user barclayc

Can anyone shed any light on why this doesnt work?
or if I should be doing this at all?
or any suggestions?

Thanks
Barclay
 
Old 10-05-2004, 08:30 AM   #2
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
ldapsam_modify_entry: Failed to modify user dn= uid=barclayc,ou=People,dc=webteam,dc=nexusmedia,dc=com with: Insufficient access

This means that the Samba server stored LDAP administrator username or password incorrect, or this user have no write privileges.
You should check "ldap admin dn" in smb.conf and get his password via your teammate.
And then test this DN and password have enough priv to LDAP Server:
ldapdelete -x -W -D "your ldap admin dn" "some user can be safely deleted"
If success, the DN and pw is ok.
then you should use
smbpasswd -w the admin dn password
to write it to smb local password db
Try again.
 
Old 10-05-2004, 08:49 AM   #3
barkers
Member
 
Registered: Apr 2002
Distribution: Debian
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks

This sounds very helpful;

I tried to run the ldapdelete command as you said, and it returned this error:

ldap_bind: Invalid DN syntax (34)
additional info: invalid DN

I'm assuming this means that the password i'm trying is wrong.

So i'm gonna find out the password and let u know what happens.

cheers
 
Old 10-05-2004, 09:00 AM   #4
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
Quote:
Originally posted by barkers
Thanks

This sounds very helpful;

I tried to run the ldapdelete command as you said, and it returned this error:

ldap_bind: Invalid DN syntax (34)
additional info: invalid DN

I'm assuming this means that the password i'm trying is wrong.

So i'm gonna find out the password and let u know what happens.

cheers
This looks like you provided DN is INVALID, you better post your command here, and your DN detail.
Are you sure your DN exist in LDAP database or slapd.conf ?
 
Old 10-05-2004, 09:38 AM   #5
barkers
Member
 
Registered: Apr 2002
Distribution: Debian
Posts: 50

Original Poster
Rep: Reputation: 15
This might be where i really show my lack of knowledge on the subject.
I think this is what your asking for

The command:
Code:
ldapdelete -x -W -D samba_admin ttest
this is the line you mentioned in smb.conf

Code:
ldap admin dn = cn=samba_admin,dc=webteam,dc=nexusmedia,dc=com
is this what you mean by DN detail?

In case this makes a difference: the test to see if the LDAP admin password was correct, was to delete an unimportant user, there weren't any so i added one(ttest).
 
Old 10-05-2004, 10:55 AM   #6
barkers
Member
 
Registered: Apr 2002
Distribution: Debian
Posts: 50

Original Poster
Rep: Reputation: 15
Aaahh. OK.

I'm catchin up a little now.

This time i did:

Code:
ldapdelete -x -W -D "cn=samba_admin,dc=webteam,dc=nexusmedia,dc=com" "cn=ttest,dc=webteam,dc=nexusmedia,dc=com"

And got back

Code:
Delete Result: Insufficient access (50)
Additional info: no write access to parent
 
Old 10-05-2004, 08:26 PM   #7
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
Quote:
Originally posted by barkers
This might be where i really show my lack of knowledge on the subject.
I think this is what your asking for

The command:
Code:
ldapdelete -x -W -D samba_admin ttest
this is the line you mentioned in smb.conf

Code:
ldap admin dn = cn=samba_admin,dc=webteam,dc=nexusmedia,dc=com
is this what you mean by DN detail?

In case this makes a difference: the test to see if the LDAP admin password was correct, was to delete an unimportant user, there weren't any so i added one(ttest).
You added one?
What DN are you use to add a user?
This DN should be a admin DN and have enough access priv.
 
Old 10-06-2004, 04:09 AM   #8
barkers
Member
 
Registered: Apr 2002
Distribution: Debian
Posts: 50

Original Poster
Rep: Reputation: 15
Sorry was being a bit of a muppet before.

the DN in smb.conf is for 'samba_admin'
But i log in to phpLDAPAdmin with the DN for the 'admin'.

I can log into phpLDAPAdmin with the samba_admin DN, so i must have the right password for it.


But when i do the ldapdelete command i get:

Code:
Delete Result: Insufficient access (50)
Additional info: no write access to parent

Is the samba_admin user not setup correctly?
if i wanted smbpasswd to use the admin user do i just change the DN in smb.conf?
is doing that a good/bad idea or bad practice or insecure or anything?

thanks
 
Old 10-06-2004, 04:18 AM   #9
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
I'm not very sure, you can try change your "ldap admin dn" and write right password via smbpasswd -w.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ldap+samba musfeq Linux - Software 4 08-08-2005 04:33 AM
Samba and LDAP problem MarioT Linux - Networking 3 01-31-2005 07:14 AM
Samba or ldap amir_h Linux - Networking 4 03-27-2004 10:59 PM
Samba PDC Problem or LDAP saavik Linux - Networking 2 05-05-2003 03:58 PM
Profiles problem (samba+ldap) u4113072 Linux - Software 1 02-02-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration