Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-22-2005, 08:14 AM   #1
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
smbpasswd -a root (openLDAP)

i'm trying to add my root user via smbpasswd with my openLDAP backend and this is what happens

[root@fedora /]# smbpasswd -a root
failed to add domain dn= sambaDomainName=DOMAIN,ou=users,dc=fedora,dc=directory,dc=server with: Invalid DN syntax
invalid DN
Adding domain info for DOMAIN failed with NT_STATUS_UNSUCCESSFUL
New SMB password:
Retype new SMB password:
ldapsam_modify_entry: Failed to add user dn= uid=root,ou=users,dc=fedora,dc=directory,dc=server with: Undefined attribute type
sambaSID: attribute type undefined
ldapsam_add_sam_account: failed to modify/add user with uid = root (dn = uid=root,ou=users,dc=fedora,dc=directory,dc=server)
Failed to add entry for user root.
Failed to modify password entry for user root

and i don't know where all that is comeing from to fix it up ...
Old 07-22-2005, 08:58 AM   #2
LQ Newbie
Registered: Jul 2005
Distribution: Fedora Core, Mandrake
Posts: 10

Rep: Reputation: 0
Are you using the right directory schema? sambaAccount is the default for samba. Also, have you used smbpasswd -w to set the root passwd for your directory server yet? It would help if you posted your etc/samba/smb.conf file.
You may want to tail -f your slapd log and see what comes up when you try to add the root user. It usually prints a fairly descriptive error message.

Last edited by hoyLANd; 07-22-2005 at 09:35 AM.
Old 07-24-2005, 06:26 PM   #3
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Original Poster
Rep: Reputation: 30
yes, i have set the smbpasswd -W password

i'm also fairly new the LDAP so i'm not sure what you mean by right schema?

and what is the tail -f ??

here is my smb.conf file



ldap admin dn = "cn=Directory Manager,dc=school,dc=cathedral,dc=qld,dc=edu,dc=au"
ldap server =
ldap ssl = start_tls
ldap port = 389
ldap suffix = "ou=users,dc=school,dc=cathedral,dc=qld,dc=edu,dc=au"
ldap filter ="(&(uid=%U)(objectclass=sambaAccount))"

workgroup = fedora
netbios name = fedora
comment = Linux RedHat Samba Server
security = user
null passwords = Yes
encrypt passwords = yes

logon drive = U:
logon path = \\%N\profiles\%g

domain master = yes
domain logons = yes
preferred master = yes
os level = 255

# we have other wins server (samba, of course)
#wins support = yes
wins support = no
wins proxy = no
wins server =

log file = /usr/local/etc2/samba_2_2/logs
public = No
browseable = No
writable = No

path = /usr/local/etc2/samba_2_2/netlogon
locking = no
read only = yes
write list = ntadmin

; share for storing user profiles
path = /usr/local/etc2/samba2_2/profiles
read only = no
writeable = yes
create mask = 0600
directory mask = 0700

Last edited by paul_mat; 07-24-2005 at 06:28 PM.
Old 07-29-2005, 02:18 PM   #4
LQ Newbie
Registered: Jul 2005
Distribution: Fedora Core, Mandrake
Posts: 10

Rep: Reputation: 0
by right schema i mean have you included samba.schema in your slapd.conf file. This schema defines object attributes and is necessary for smb-ldap.

tail -f will show you the end of a log file in real time as it is being updated. use it on your slapd log and you will almost certainly get some useful information.

tail -f /var/log/slapd.log

If that's not where your slapd log is, check slapd.conf for the path. you may want to add the line "loglevel 512" to your slapd.conf to make your logs more verbose.

Your smb.conf looks fine, but your smbpasswd is using the wrong dn. it dosen't match your directory. Try restarting samba to reload the smb.conf file. If that doesn't work, I don't know. Maybe you accidentally installed samba twice?

SHORTCUT: If you're willing to switch from slackware to fedora core, i know of a script that will completely set up samba with an LDAP backend, create a root account for samba, and give you a working domain in about 5 minutes. It will only run correctly on Fedora Core 3, but it runs great. check out to get the tarball with the script and all the required rpms. You will probably find this much easier than setting up samba yourself. Just a thought.

Last edited by hoyLANd; 07-29-2005 at 02:23 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
adding users using smbpasswd, or synchronise passwd/smbpasswd gyodai Linux - Networking 2 03-11-2009 03:47 PM
Cannot change smbpasswd robintw Linux - Networking 5 08-09-2005 11:34 PM
smbpasswd -a ... smbpasswd: Command not found Lleb_KCir Linux - Software 7 08-11-2004 12:27 PM
smbpasswd whaase Linux - Networking 3 11-02-2003 04:48 PM
smbpasswd is pissing me off. Need help JoeLinux Linux - Networking 2 06-09-2002 01:04 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:01 AM.

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