OpenLDAP + Samba Domain Controller On Ubuntu 7.10

Discussion in 'HOWTO-Related Questions' started by E1sbaer, Apr 18, 2008.

  1. E1sbaer

    E1sbaer New Member

    Hi!

    I try sevaral posibilities in the last 2 weeks to get an linux-server which control win xp sp2 clients. As i saw this HowTo i deletet all older version and begin with a new Ubuntu Server 7.10 without any other packages.
    I had done Step by Step what the HowTo said. Step 7 dosent worked, but i still thought there will bee hope after i finished. But there is no Domain and many questions which have to bee answerd.

    To get here and get faster help i installed after all ubuntu-desktop. I hope that dont bring new problems.

    Now i think my best choice is beginning by Step 1. I will take Step by step and show here my Problems. I will show everything I do, perhaps it will help other users to solve there problems or help my helpers to see whats wrong in my configuration.

    Whats wront until yet? Step 3

    Code:
    root@linuxserver:~# /etc/init.d/slapd restart
    Stopping OpenLDAP: slapd.
    Starting OpenLDAP: slapd - failed.
    The operation failed but no output was produced. For hints on what went
    wrong please refer to the system's logfiles (e.g. /var/log/syslog) or
    try running the daemon in Debug mode like via "slapd -d 16383" (warning:
    this will create copious output).
    
    Below, you can find the command line options used by this script to 
    run slapd and slurpd. Do not forget to specify those options if you
    want to look to debugging output:
      slapd -g openldap -u openldap 
    
    next steps let me produce /etc/ldap/slapd.conf :
    (something is here different to the howto!! orginal entries no commited out...
    # Change the line:

    access to attribute=userPassword

    # to:

    access to attrs=userPassword,sambaNTPassword,sambaLMPassword
    Den orginalen Bereich kann man aber sicher noch sehen...)
    Code:
    # 'backend' directive occurs
    backend		bdb
    checkpoint 512 30
    
    #######################################################################
    # Specific Backend Directives for 'other':
    # Backend specific directives apply to this backend until another
    # 'backend' directive occurs
    #backend		<other>
    
    #######################################################################
    # Specific Directives for database #1, of type bdb:
    # Database specific directives apply to this databasse until another
    # 'database' directive occurs
    database        bdb
    
    # The base of your directory in database #1
    suffix          "dc=interakteam,dc=de"
    
    # rootdn directive for specifying a superuser on the database. This is needed
    # for syncrepl.
    # rootdn          "cn=admin,dc=interakteam,dc=de"
    
    # Where the database file are physically stored for database #1
    directory       "/var/lib/ldap"
    
    # For the Debian package we use 2MB as default but be sure to update this
    # value if you have plenty of RAM
    dbconfig set_cachesize 0 2097152 0
    
    # Sven Hartge reported that he had to set this value incredibly high
    # to get slapd running at all. See http://bugs.debian.org/303057
    # for more information.
    
    # Number of objects that can be locked at the same time.
    dbconfig set_lk_max_objects 1500
    # Number of locks (both requested and granted)
    dbconfig set_lk_max_locks 1500
    # Number of lockers
    dbconfig set_lk_max_lockers 1500
    
    # Indexing options for database #1
    index           objectClass eq
    
    # Save the time that the entry gets modified, for database #1
    lastmod         on
    
    # Where to store the replica logs for database #1
    # replogfile	/var/lib/ldap/replog
    
    # The userPassword by default can be changed
    # by the entry owning it if they are authenticated.
    # Others should not be able to see it, except the
    # admin entry below
    # These access lines apply to database #1 only
    #-----org-------
    #access to attrs=userPassword,shadowLastChange
    #        by dn="cn=admin,dc=interakteam,dc=de" write
    #        by anonymous auth
    #        by self write
    #        by * none
    #-----org------
    access to attrs=userPassword, sambaNTPassword, sambaLMPassword
    
    # Ensure read access to the base for things like
    # supportedSASLMechanisms.  Without this you may
    # have problems with SASL not knowing what
    # mechanisms are available and the like.
    # Note that this is covered by the 'access to *'
    # ACL below too but if you change that as people
    # are wont to do you'll still need this if you
    # want SASL (and possible other things) to work 
    # happily.
    access to dn.base="" by * read
    
    # The admin dn has full write access, everyone else
    # can read everything.
    access to *
            by dn="cn=admin,dc=interakteam,dc=de" write
            by * read
    
    # For Netscape Roaming support, each user gets a roaming
    # profile for which they have write access to
    #access to dn=".*,ou=Roaming,o=morsnet"
    #        by dn="cn=admin,dc=interakteam,dc=de" write
    #        by dnattr=owner write
    
    #######################################################################
    # Specific Directives for database #2, of type 'other' (can be bdb too):
    # Database specific directives apply to this databasse until another
    # 'database' directive occurs
    #database        <other>
    
    # The base of your directory for database #2
    #suffix		"dc=debian,dc=org"
    
    my /etc/samba/smb.conf after all...

    Code:
    #
    # Sample configuration file for the Samba suite for Debian GNU/Linux.
    #
    #
    # This is the main Samba configuration file. You should read the
    # smb.conf(5) manual page in order to understand the options listed
    # here. Samba has a huge number of configurable options most of which 
    # are not shown in this example
    #
    # Any line which starts with a ; (semi-colon) or a # (hash) 
    # is a comment and is ignored. In this example we will use a #
    # for commentary and a ; for parts of the config file that you
    # may wish to enable
    #
    # NOTE: Whenever you modify this file you should run the command
    # "testparm" to check that you have not made any basic syntactic 
    # errors. 
    #
    
    #======================= Global Settings =======================
    
    [global]
    
    ## Browsing/Identification ###
    
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = INTERAKTEAM
    
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba, Ubuntu)
    
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    ;   wins support = no
    
    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    ;   wins server = w.x.y.z
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = no
    
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
    ;   name resolve order = lmhosts host wins bcast
    
    #### Networking ####
    
    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ;   interfaces = 127.0.0.0/8 eth0
    
    # Only bind to the named interfaces and/or networks; you must use the
    # 'interfaces' option above to use this.
    # It is recommended that you enable this feature if your Samba machine is
    # not protected by a firewall or is a firewall itself.  However, this
    # option cannot handle dynamic or non-broadcast interfaces correctly.
    ;   bind interfaces only = true
    
    
    
    #### Debugging/Accounting ####
    
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
    
    # Put a capping on the size of the log files (in Kb).
       max log size = 1000
    
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    ;   syslog only = no
    
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
    
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
    
    
    ####### Authentication #######
    
    # "security = user" is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
    # in the samba-doc package for details.
      security = user
    
    # You may wish to use password encryption.  See the section on
    # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
       encrypt passwords = true
    
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = ldapsam:ldap://localhost/
    
       obey pam restrictions = no
    #############################################################
    ##from HowTo#######
    #############################################################
    # Begin: Custom LDAP Entries
    ldap admin dn = cn=admin,dc=interakteam,dc=de
    ldap suffix = dc=interakteam, dc=de
    ldap group suffix = ou=Groups
    ldap user suffix =ou=Users
    ldap machine suffix = ou=Computers
    ldap idmap suffix = ou=Users
    ;Do ldap passwd sync
    ldap passwd sync = Yes
    passwd program = /usr/sbin/smbldap-passwd %u
    passwd chat = *New*password* %n\n *Retype*new*password* %n\n 
    *all*authentication*tokens*updated*
    add user script = /usr/sbin/smbldap-useradd -m "%u"
    ldap delete dn = Yes
    delete user script = /usr/sbin/smbldap-userdel "%u"
    add machine script = /usr/sbin/smbldap-useradd -w "%u"
    add group script = /usr/sbin/smbldap-groupadd -p "%g"
    delete group script = /usr/sbin/smbldap-groupdel "%g"
    add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
    delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
    set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
    domain logons = yes
    
    ;   guest account = nobody
    ;   invalid users = root
    
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
    ;   unix password sync = no
    
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Ian Kahan <<[email protected]> for
    # sending the correct chat script for the passwd program in Debian Sarge).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *passwd:*password\supdated\ssuccessfully* .
    
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
    ;   pam password change = no
    
    ########## Domains ###########
    
    # Is this machine able to authenticate users. Both PDC and BDC
    # must have this setting enabled. If you are the BDC you must
    # change the 'domain master' setting to no
    #
    ;   domain logons = yes
    #
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of the user's profile directory
    # from the client point of view)
    # The following required a [profiles] share to be setup on the
    # samba server (see below)
    
    ;   logon path = \\%N\profiles\%U
    # howto
    logon path =
    # Another common choice is storing the profile in the user's home directory
    ;   logon path = \\%N\%U\profile
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of a user's home directory (from the client
    # point of view)
    ;   logon drive = H:
    ;   logon home = \\%N\%U
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the script to run during logon. The script must be stored
    # in the [netlogon] share
    # NOTE: Must be store in 'DOS' file format convention
    ;   logon script = logon.cmd
    
    # This allows Unix users to be created on the domain controller via the SAMR
    # RPC pipe.  The example command creates a user account with a disabled Unix
    # password; please adapt to your needs
    ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
    
    ########## Printing ##########
    
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    ;   load printers = yes
    
    # lpr(ng) printing. You may wish to override the location of the
    # printcap file
    ;   printing = bsd
    ;   printcap name = /etc/printcap
    
    # CUPS printing.  See also the cupsaddsmb(8) manpage in the
    # cupsys-client package.
    ;   printing = cups
    ;   printcap name = cups
    
    # When using [print$], root is implicitly a 'printer admin', but you can
    # also give this right to other users to add drivers and set printer
    # properties
    ;   printer admin = @lpadmin
    
    
    ############ Misc ############
    
    # Using the following line enables you to customise your configuration
    # on a per machine basis. The %m gets replaced with the netbios name
    # of the machine that is connecting
    ;   include = /home/samba/etc/smb.conf.%m
    
    # Most people will find that this option gives better performance.
    # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
    # for details
    # You may want to add the following on a Linux system:
    #         SO_RCVBUF=8192 SO_SNDBUF=8192
       socket options = TCP_NODELAY
    
    # The following parameter is useful only if you have the linpopup package
    # installed. The samba maintainer and the linpopup maintainer are
    # working to ease installation and configuration of linpopup and samba.
    ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
    
    # Domain Master specifies Samba to be the Domain Master Browser. If this
    # machine will be configured as a BDC (a secondary logon server), you
    # must set this to 'no'; otherwise, the default behavior is recommended.
    ;   domain master = auto
    
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
    ;
    ; The following was the default behaviour in sarge
    ; but samba upstream reverted the default because it might induce
    ; performance issues in large organizations
    ; See #368251 for some of the consequences of *not* having
    ; this setting and smb.conf(5) for all details
    ;
    ;   winbind enum groups = yes
    ;   winbind enum users = yes
    
    #======================= Share Definitions =======================
    
    # Un-comment the following (and tweak the other settings below to suit)
    # to enable the default home directory shares.  This will share each
    # user's home directory as \\server\username
    ;[homes]
    ;   comment = Home Directories
    ;   browseable = no
    
    # By default, \\server\username shares can be connected to by anyone
    # with access to the samba server.  Un-comment the following parameter
    # to make sure that only "username" can connect to \\server\username
    # This might need tweaking when using external authentication schemes
    ;   valid users = %S
    
    # By default, the home directories are exported read-only. Change next
    # parameter to 'yes' if you want to be able to write to them.
    ;   writable = no
    
    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
    ;   create mask = 0700
    
    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
    ;   directory mask = 0700
    
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   writable = no
    ;   share modes = no
    
    # Un-comment the following and create the profiles directory to store
    # users profiles (see the "logon path" option above)
    # (you need to configure Samba to act as a domain controller too.)
    # The path below should be writable by all users so that their
    # profile directory may be created the first time they log on
    ;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700
    
    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       public = no
       writable = no
       create mode = 0700
    
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # Replace 'ntadmin' with the name of the group your admin users are
    # members of.
    ;   write list = root, @ntadmin
    
    # A sample share for sharing your CD-ROM with others.
    ;[cdrom]
    ;   comment = Samba server's CD-ROM
    ;   writable = no
    ;   locking = no
    ;   path = /cdrom
    ;   public = yes
    
    # The next two parameters show how to auto-mount a CD-ROM when the
    #	cdrom share is accesed. For this to work /etc/fstab must contain
    #	an entry like this:
    #
    #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
    #
    # The CD-ROM gets unmounted automatically after the connection to the
    #
    # If you don't want to use auto-mounting/unmounting make sure the CD
    #	is mounted on /cdrom
    #
    ;   preexec = /bin/mount /cdrom
    ;   postexec = /bin/umount /cdrom
    
    
    
    
    whats wrong here?
    Code:
    root@linuxserver:~# /etc/init.d/samba restart
     * Stopping Samba daemons...                                                    [COLOR="Red"]start-stop-daemon: warning: failed to kill 4894: No such process[/COLOR]
                                                                             [ OK ]
     * Starting Samba daemons                                                [ OK ]
    Here it takes very long and looks not good...
    Code:
    [root@linuxserver:~# net getlocalsid
    [2008/04/18 01:18:08, 0] lib/smbldap.c:smbldap_connect_system(982)
      failed to bind to server ldap://localhost/ with dn="cn=admin,dc=interakteam,dc=de" Error: Can't contact LDAP server
            (unknown)
    SID for domain LINUXSERVER is: S-1-5-21-2758664158-3454757315-315893089/CODE]
    
    
    My /etc/smbldap-tools/smbldap.conf
    
    [CODE]
    # $Source: /opt/cvs/samba/smbldap-tools/smbldap.conf,v $
    # $Id: smbldap.conf,v 1.18 2005/05/27 14:28:47 jtournier Exp $
    #
    # smbldap-tools.conf : Q & D configuration file for smbldap-tools
    
    #  This code was developped by IDEALX (http://IDEALX.org/) and
    #  contributors (their names can be found in the CONTRIBUTORS file).
    #
    #                 Copyright (C) 2001-2002 IDEALX
    #
    #  This program is free software; you can redistribute it and/or
    #  modify it under the terms of the GNU General Public License
    #  as published by the Free Software Foundation; either version 2
    #  of the License, or (at your option) any later version.
    #
    #  This program is distributed in the hope that it will be useful,
    #  but WITHOUT ANY WARRANTY; without even the implied warranty of
    #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #  GNU General Public License for more details.
    #
    #  You should have received a copy of the GNU General Public License
    #  along with this program; if not, write to the Free Software
    #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
    #  USA.
    
    #  Purpose :
    #       . be the configuration file for all smbldap-tools scripts
    
    ##############################################################################
    #
    # General Configuration
    #
    ##############################################################################
    
    # Put your own SID. To obtain this number do: "net getlocalsid".
    # If not defined, parameter is taking from "net getlocalsid" return
    #org 
    #SID="S-1-5-21-4205727931-4131263253-1851132061"
    SID="S-1-5-21-2758664158-3454757315-315893089"
    # Domain name the Samba server is in charged.
    # If not defined, parameter is taking from smb.conf configuration file
    # Ex: sambaDomain="IDEALX-NT"
    sambaDomain="INTERAKTEAM"
    
    ##############################################################################
    #
    # LDAP Configuration
    #
    ##############################################################################
    
    # Notes: to use to dual ldap servers backend for Samba, you must patch
    # Samba with the dual-head patch from IDEALX. If not using this patch
    # just use the same server for slaveLDAP and masterLDAP.
    # Those two servers declarations can also be used when you have 
    # . one master LDAP server where all writing operations must be done
    # . one slave LDAP server where all reading operations must be done
    #   (typically a replication directory)
    
    # Slave LDAP server
    # Ex: slaveLDAP=127.0.0.1
    # If not defined, parameter is set to "127.0.0.1"
    slaveLDAP="127.0.0.1"
    
    # Slave LDAP port
    # If not defined, parameter is set to "389"
    slavePort="389"
    
    # Master LDAP server: needed for write operations
    # Ex: masterLDAP=127.0.0.1
    # If not defined, parameter is set to "127.0.0.1"
    masterLDAP="127.0.0.1"
    
    # Master LDAP port
    # If not defined, parameter is set to "389"
    masterPort="389"
    
    # Use TLS for LDAP
    # If set to 1, this option will use start_tls for connection
    # (you should also used the port 389)
    # If not defined, parameter is set to "1"
    ldapTLS="0"
    
    # How to verify the server's certificate (none, optional or require)
    # see "man Net::LDAP" in start_tls section for more details
    verify="require"
    
    # CA certificate
    # see "man Net::LDAP" in start_tls section for more details
    cafile="/etc/opt/IDEALX/smbldap-tools/ca.pem"
    
    # certificate to use to connect to the ldap server
    # see "man Net::LDAP" in start_tls section for more details
    clientcert="/etc/opt/IDEALX/smbldap-tools/smbldap-tools.pem"
    
    # key certificate to use to connect to the ldap server
    # see "man Net::LDAP" in start_tls section for more details
    clientkey="/etc/opt/IDEALX/smbldap-tools/smbldap-tools.key"
    
    # LDAP Suffix
    # Ex: suffix=dc=IDEALX,dc=ORG
    suffix="dc=interakteam,dc=de"
    
    # Where are stored Users
    # Ex: usersdn="ou=Users,dc=IDEALX,dc=ORG"
    # Warning: if 'suffix' is not set here, you must set the full dn for usersdn
    usersdn="ou=Users,${suffix}"
    
    # Where are stored Computers
    # Ex: computersdn="ou=Computers,dc=IDEALX,dc=ORG"
    # Warning: if 'suffix' is not set here, you must set the full dn for computersdn
    computersdn="ou=Computers,${suffix}"
    
    # Where are stored Groups
    # Ex: groupsdn="ou=Groups,dc=IDEALX,dc=ORG"
    # Warning: if 'suffix' is not set here, you must set the full dn for groupsdn
    groupsdn="ou=Groups,${suffix}"
    
    # Where are stored Idmap entries (used if samba is a domain member server)
    # Ex: groupsdn="ou=Idmap,dc=IDEALX,dc=ORG"
    # Warning: if 'suffix' is not set here, you must set the full dn for idmapdn
    idmapdn="ou=Idmap,${suffix}"
    
    # Where to store next uidNumber and gidNumber available for new users and groups
    # If not defined, entries are stored in sambaDomainName object.
    # Ex: sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
    # Ex: sambaUnixIdPooldn="cn=NextFreeUnixId,${suffix}"
    sambaUnixIdPooldn="sambaDomainName=INTERAKTEAM,${suffix}"
    
    # Default scope Used
    scope="sub"
    
    # Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
    hash_encrypt="SSHA"
    
    # if hash_encrypt is set to CRYPT, you may set a salt format.
    # default is "%s", but many systems will generate MD5 hashed
    # passwords if you use "$1$%.8s". This parameter is optional!
    crypt_salt_format="%s"
    
    ##############################################################################
    # 
    # Unix Accounts Configuration
    # 
    ##############################################################################
    
    # Login defs
    # Default Login Shell
    # Ex: userLoginShell="/bin/bash"
    userLoginShell="/bin/bash"
    
    # Home directory
    # Ex: userHome="/home/%U"
    userHome="/home/%U"
    
    # Default mode used for user homeDirectory
    userHomeDirectoryMode="700"
    
    # Gecos
    userGecos="System User"
    
    # Default User (POSIX and Samba) GID
    defaultUserGid="513"
    
    # Default Computer (Samba) GID
    defaultComputerGid="515"
    
    # Skel dir
    skeletonDir="/etc/skel"
    
    # Default password validation time (time in days) Comment the next line if
    # you don't want password to be enable for defaultMaxPasswordAge days (be
    # careful to the sambaPwdMustChange attribute's value)
    defaultMaxPasswordAge="45"
    
    ##############################################################################
    #
    # SAMBA Configuration
    #
    ##############################################################################
    
    # The UNC path to home drives location (%U username substitution)
    # Just set it to a null string if you want to use the smb.conf 'logon home'
    # directive and/or disable roaming profiles
    # Ex: userSmbHome="\\PDC-SMB3\%U"
    #org
    #userSmbHome="\\PDC-SRV\%U"
    userSmbHome=
    # The UNC path to profiles locations (%U username substitution)
    # Just set it to a null string if you want to use the smb.conf 'logon path'
    # directive and/or disable roaming profiles
    # Ex: userProfile="\\PDC-SMB3\profiles\%U"
    #org
    #userProfile="\\PDC-SRV\profiles\%U"
    userProfile=
    # The default Home Drive Letter mapping
    # (will be automatically mapped at logon time if home directory exist)
    # Ex: userHomeDrive="H:"
    #org
    #userHomeDrive="H:"
    userHomeDrive=
    # The default user netlogon script name (%U username substitution)
    # if not used, will be automatically username.cmd
    # make sure script file is edited under dos
    # Ex: userScript="startup.cmd" # make sure script file is edited under dos
    #org
    #userScript="logon.bat"
    userScript=
    
    # Domain appended to the users "mail"-attribute
    # when smbldap-useradd -M is used
    # Ex: mailDomain="idealx.com"
    mailDomain="interakteam.de"
    
    ##############################################################################
    #
    # SMBLDAP-TOOLS Configuration (default are ok for a RedHat)
    #
    ##############################################################################
    
    # Allows not to use smbpasswd (if with_smbpasswd == 0 in smbldap_conf.pm) but
    # prefer Crypt::SmbHash library
    with_smbpasswd="0"
    smbpasswd="/usr/bin/smbpasswd"
    
    # Allows not to use slappasswd (if with_slappasswd == 0 in smbldap_conf.pm)
    # but prefer Crypt:: libraries
    with_slappasswd="0"
    slappasswd="/usr/sbin/slappasswd"
    
    # comment out the following line to get rid of the default banner
    # no_banner="1"
    
    
    
    my /etc/smbldap-tools/smbldap_bind.conf
    Code:
    ############################
    # Credential Configuration #
    ############################
    # Notes: you can specify two differents configuration if you use a
    # master ldap for writing access and a slave ldap server for reading access
    # By default, we will use the same DN (so it will work for standard Samba
    # release)
    #orgb
    #slaveDN="cn=Manager,dc=idealx,dc=org"
    #slavePw="secret"
    #masterDN="cn=Manager,dc=idealx,dc=org"
    #masterPw="secret"
    #orge
    slaveDN="cn=admin,dc=interakteam,dc=de"
    slavePw="12345"
    masterDN="cn=admin,dc=interakteam,dc=de"
    masterPw="12345"

    Here i solved one Problem (look here http://http://www.howtoforge.com/forums/showthread.php?t=21069&highlight=OpenLDAP+Samba+Domain+Controller+Ubuntu+7.10) with smbpasswd -w 12345 but now there is:

    Code:
    root@linuxserver:~# smbldap-populate -u 30000 -g 30000
    Use of uninitialized value in substitution (s///) at /usr/share/perl5/smbldap_tools.pm line 140, <CONFIGFILE> line 116.
    Populating LDAP directory for domain INTERAKTEAM (S-1-5-21-2758664158-3454757315-315893089)
    (using builtin directory structure)
    
    erreur LDAP: Can't contact master ldap server (IO::Socket::INET: connect: Connection refused) at /usr/share/perl5/smbldap_tools.pm line 282.
    
    no suprise after now there is not much which works:

    Code:
    root@linuxserver:~# smbldap-useradd -a -m -M ricky -c "Richard M" ricky
    Use of uninitialized value in substitution (s///) at /usr/share/perl5/smbldap_tools.pm line 140, <CONFIGFILE> line 116.
    erreur LDAP: Can't contact master ldap server (IO::Socket::INET: connect: Connection refused) at /usr/share/perl5/smbldap_tools.pm line 282.
    /etc/ldap.conf
    Code:
    ###DEBCONF###
    ##
    ## Configuration of this file will be managed by debconf as long as the
    ## first line of the file says '###DEBCONF###'
    ##
    ## You should use dpkg-reconfigure to configure this file via debconf
    ##
    
    #
    # @(#)$Id: ldap.conf,v 1.38 2006/05/15 08:13:31 lukeh Exp $
    #
    # This is the configuration file for the LDAP nameservice
    # switch library and the LDAP PAM module.
    #
    # PADL Software
    # http://www.padl.com
    #
    
    # Your LDAP server. Must be resolvable without using LDAP.
    # Multiple hosts may be specified, each separated by a 
    # space. How long nss_ldap takes to failover depends on
    # whether your LDAP client library supports configurable
    # network or connect timeouts (see bind_timelimit).
    host 127.0.0.1
    
    # The distinguished name of the search base.
    base dc=interakteam,dc=de
    
    # Another way to specify your LDAP server is to provide an
    # uri with the server name. This allows to use
    # Unix Domain Sockets to connect to a local LDAP Server.
    uri ldap://127.0.0.1/
    #uri ldaps://127.0.0.1/   
    #uri ldapi://%2fvar%2frun%2fldapi_sock/
    # Note: %2f encodes the '/' used as directory separator
    
    # The LDAP version to use (defaults to 3
    # if supported by client library)
    ldap_version 3
    
    # The distinguished name to bind to the server with.
    # Optional: default is to bind anonymously.
    #binddn cn=proxyuser,dc=padl,dc=com
    
    # The credentials to bind with. 
    # Optional: default is no credential.
    #bindpw secret
    
    # The distinguished name to bind to the server with
    # if the effective user ID is root. Password is
    # stored in /etc/ldap.secret (mode 600)
    rootbinddn cn=admin,dc=interakteam,dc=de
    
    # The port.
    # Optional: default is 389.
    #port 389
    
    # The search scope.
    #scope sub
    #scope one
    #scope base
    
    # Search timelimit
    #timelimit 30
    
    # Bind/connect timelimit
    #bind_timelimit 30
    
    # Reconnect policy: hard (default) will retry connecting to
    # the software with exponential backoff, soft will fail
    # immediately.
    bind_policy soft
    
    # Idle timelimit; client will close connections
    # (nss_ldap only) if the server has not been contacted
    # for the number of seconds specified below.
    #idle_timelimit 3600
    
    # Filter to AND with uid=%s
    #pam_filter objectclass=account
    
    # The user ID attribute (defaults to uid)
    #pam_login_attribute uid
    
    # Search the root DSE for the password policy (works
    # with Netscape Directory Server)
    #pam_lookup_policy yes
    
    # Check the 'host' attribute for access control
    # Default is no; if set to yes, and user has no
    # value for the host attribute, and pam_ldap is
    # configured for account management (authorization)
    # then the user will not be allowed to login.
    #pam_check_host_attr yes
    
    # Check the 'authorizedService' attribute for access
    # control
    # Default is no; if set to yes, and the user has no
    # value for the authorizedService attribute, and
    # pam_ldap is configured for account management
    # (authorization) then the user will not be allowed
    # to login.
    #pam_check_service_attr yes
    
    # Group to enforce membership of
    #pam_groupdn cn=PAM,ou=Groups,dc=padl,dc=com
    
    # Group member attribute
    #pam_member_attribute uniquemember
    
    # Specify a minium or maximum UID number allowed
    #pam_min_uid 0
    #pam_max_uid 0
    
    # Template login attribute, default template user
    # (can be overriden by value of former attribute
    # in user's entry)
    #pam_login_attribute userPrincipalName
    #pam_template_login_attribute uid
    #pam_template_login nobody
    
    # HEADS UP: the pam_crypt, pam_nds_passwd,
    # and pam_ad_passwd options are no
    # longer supported.
    #
    # Do not hash the password at all; presume
    # the directory server will do it, if
    # necessary. This is the default.
    pam_password md5
    
    # Hash password locally; required for University of
    # Michigan LDAP server, and works with Netscape
    # Directory Server if you're using the UNIX-Crypt
    # hash mechanism and not using the NT Synchronization
    # service. 
    #pam_password crypt
    
    # Remove old password first, then update in
    # cleartext. Necessary for use with Novell
    # Directory Services (NDS)
    #pam_password clear_remove_old
    #pam_password nds
    
    # RACF is an alias for the above. For use with
    # IBM RACF
    #pam_password racf
    
    # Update Active Directory password, by
    # creating Unicode password and updating
    # unicodePwd attribute.
    #pam_password ad
    
    # Use the OpenLDAP password change
    # extended operation to update the password.
    #pam_password exop
    
    # Redirect users to a URL or somesuch on password
    # changes.
    #pam_password_prohibit_message Please visit http://internal to change your password.
    
    # RFC2307bis naming contexts
    # Syntax:
    # nss_base_XXX		base?scope?filter
    # where scope is {base,one,sub}
    # and filter is a filter to be &'d with the
    # default filter.
    # You can omit the suffix eg:
    # nss_base_passwd	ou=People,
    # to append the default base DN but this
    # may incur a small performance impact.
    #nss_base_passwd	ou=People,dc=padl,dc=com?one
    #nss_base_shadow	ou=People,dc=padl,dc=com?one
    #nss_base_group		ou=Group,dc=padl,dc=com?one
    #nss_base_hosts		ou=Hosts,dc=padl,dc=com?one
    #nss_base_services	ou=Services,dc=padl,dc=com?one
    #nss_base_networks	ou=Networks,dc=padl,dc=com?one
    #nss_base_protocols	ou=Protocols,dc=padl,dc=com?one
    #nss_base_rpc		ou=Rpc,dc=padl,dc=com?one
    #nss_base_ethers	ou=Ethers,dc=padl,dc=com?one
    #nss_base_netmasks	ou=Networks,dc=padl,dc=com?ne
    #nss_base_bootparams	ou=Ethers,dc=padl,dc=com?one
    #nss_base_aliases	ou=Aliases,dc=padl,dc=com?one
    #nss_base_netgroup	ou=Netgroup,dc=padl,dc=com?one
    
    # attribute/objectclass mapping
    # Syntax:
    #nss_map_attribute	rfc2307attribute	mapped_attribute
    #nss_map_objectclass	rfc2307objectclass	mapped_objectclass
    
    # configure --enable-nds is no longer supported.
    # NDS mappings
    #nss_map_attribute uniqueMember member
    
    # Services for UNIX 3.5 mappings
    #nss_map_objectclass posixAccount User
    #nss_map_objectclass shadowAccount User
    #nss_map_attribute uid msSFU30Name
    #nss_map_attribute uniqueMember msSFU30PosixMember
    #nss_map_attribute userPassword msSFU30Password
    #nss_map_attribute homeDirectory msSFU30HomeDirectory
    #nss_map_attribute homeDirectory msSFUHomeDirectory
    #nss_map_objectclass posixGroup Group
    #pam_login_attribute msSFU30Name
    #pam_filter objectclass=User
    #pam_password ad
    
    # configure --enable-mssfu-schema is no longer supported.
    # Services for UNIX 2.0 mappings
    #nss_map_objectclass posixAccount User
    #nss_map_objectclass shadowAccount user
    #nss_map_attribute uid msSFUName
    #nss_map_attribute uniqueMember posixMember
    #nss_map_attribute userPassword msSFUPassword
    #nss_map_attribute homeDirectory msSFUHomeDirectory
    #nss_map_attribute shadowLastChange pwdLastSet
    #nss_map_objectclass posixGroup Group
    #nss_map_attribute cn msSFUName
    #pam_login_attribute msSFUName
    #pam_filter objectclass=User
    #pam_password ad
    
    # RFC 2307 (AD) mappings
    #nss_map_objectclass posixAccount user
    #nss_map_objectclass shadowAccount user
    #nss_map_attribute uid sAMAccountName
    #nss_map_attribute homeDirectory unixHomeDirectory
    #nss_map_attribute shadowLastChange pwdLastSet
    #nss_map_objectclass posixGroup group
    #nss_map_attribute uniqueMember member
    #pam_login_attribute sAMAccountName
    #pam_filter objectclass=User
    #pam_password ad
    
    # configure --enable-authpassword is no longer supported
    # AuthPassword mappings
    #nss_map_attribute userPassword authPassword
    
    # AIX SecureWay mappings
    #nss_map_objectclass posixAccount aixAccount
    #nss_base_passwd ou=aixaccount,?one
    #nss_map_attribute uid userName
    #nss_map_attribute gidNumber gid
    #nss_map_attribute uidNumber uid
    #nss_map_attribute userPassword passwordChar
    #nss_map_objectclass posixGroup aixAccessGroup
    #nss_base_group ou=aixgroup,?one
    #nss_map_attribute cn groupName
    #nss_map_attribute uniqueMember member
    #pam_login_attribute userName
    #pam_filter objectclass=aixAccount
    #pam_password clear
    
    # Netscape SDK LDAPS
    #ssl on
    
    # Netscape SDK SSL options
    #sslpath /etc/ssl/certs
    
    # OpenLDAP SSL mechanism
    # start_tls mechanism uses the normal LDAP port, LDAPS typically 636
    #ssl start_tls
    #ssl on
    
    # OpenLDAP SSL options
    # Require and verify server certificate (yes/no)
    # Default is to use libldap's default behavior, which can be configured in
    # /etc/openldap/ldap.conf using the TLS_REQCERT setting.  The default for
    # OpenLDAP 2.0 and earlier is "no", for 2.1 and later is "yes".
    #tls_checkpeer yes
    
    # CA certificates for server certificate verification
    # At least one of these are required if tls_checkpeer is "yes"
    #tls_cacertfile /etc/ssl/ca.cert
    #tls_cacertdir /etc/ssl/certs
    
    # Seed the PRNG if /dev/urandom is not provided
    #tls_randfile /var/run/egd-pool
    
    # SSL cipher suite
    # See man ciphers for syntax
    #tls_ciphers TLSv1
    
    # Client certificate and key
    # Use these, if your server requires client authentication.
    #tls_cert
    #tls_key
    
    # Disable SASL security layers. This is needed for AD.
    #sasl_secprops maxssf=0
    
    # Override the default Kerberos ticket cache location.
    #krb5_ccname FILE:/etc/.ldapcache
    
    # SASL mechanism for PAM authentication - use is experimental
    # at present and does not support password policy control
    #pam_sasl_mech DIGEST-MD5
    
    
    Code:
    [open_ldap]
    nss_passwd=passwd: compat ldap
    nss_group=group: compat ldap
    nss_shadow=shadow: compat ldap
    pam_auth=auth	   required pam_env.so
     auth		   sufficient    pam_unix.so likeauth nullok
     auth		   sufficient	 pam_ldap.so use_first_pass
     auth		   required	 pam_deny.so
    pam_account=account		 sufficient	pam_inix.se
     account			 sufficient	pam_ldap.so
     account			 required	pam_deny.so
    pam_password=password		 sufficient	pam_unix.so nullok md5 shadow 
    use_authtok
     password	sufficient	pam_ldap.so use_fist_pass
     password	required	pam_deny.se
    pam_session=session		required	pam_limits.so
     session	required 	pam_mkhomedir.so skel=/etc/skel/
     session 	required 	pam_unix.so
     session 	optional 	pam_ldap.so
    Code:
    root@linuxserver:~# auth-client-config -a -p open_ldap
    ** WARNING: Skipping 'open_ldap' (couldn't process)
    ** WARNING: Skipping 'open_ldap~' (couldn't process)
    Usage: auth-client-config -p PROFILE -a -t TYPE [-dn -f FILE]
           auth-client-config -p PROFILE -a -t TYPE -r [-n -f FILE]
           auth-client-config -p PROFILE -a -t TYPE -s [-f FILE]
    
    auth-client-config: error: option -p: invalid choice: 'open_ldap' (choose from 'ldap_example', 'lac_ldap', 'kerberos_example')
    

    /etc/resolv.conf

    Code:
    search interakteam.de
    nameserver 192.168.0.111
    Sorry for that very long topic, but i saw sevaral Pages where people had problems like i have. I think it is time to solve them and get the answers all here together.

    Thanks a lot to evrybody who whant to help!

    Icebaer ->German-> Eisbär
     
  2. azgli

    azgli New Member

    Same Problem - any help?

    I am getting the same problem with slapd failing with no output. Is there anyone who might have a hint on how to fix this or even find out what is wrong?
     
  3. alshira

    alshira New Member

    Vista login in domain

    When i tried to join a Vista PC in domain show the following message:
    The join operation was not successful. This could be because an existing computer account having name "name_of_machine" was previously created using a different set of credentials. Use a different computer name, or contact your administrator to remove any state conflict account. The error was: Access id Denied

    Thanks for the help that you can bring me.
     
  4. alshira

    alshira New Member

    Solve

    The problem was i didn't comment the line:
    invalid users = root

    in the /etc/samba/smb.conf
     

Share This Page