OpenLDAP + Samba Domain Controller On Ubuntu 7.10

Discussion in 'HOWTO-Related Questions' started by agarcia71, Jan 18, 2008.

  1. agarcia71

    agarcia71 New Member

    hi guys:

    this is my 3rd day, I tryng to setup my ldap server with this howto. I follow all the steps like the howto

    My problem is this: when I run this command
    Code:
    admon@ldap$ net getlocalsid
    
    got this error:

    Code:
    [2008/01/17 18:42:30, 0] lib/smbldap.c:smbldap_connect_system(982)
      failed to bind to server ldap://localhost/ with dn="cn=admin,dc=ddiscovery,dc=local" Error: Can't contact LDAP server
            (unknown)
    
    after a few seconds appears the SID

    I don't know what I'm doing wrong:

    this is my smb.conf

    Code:
    
    [global]
    
    workgroup = DDISCOVERY
    server string = Domain Server (Samba, Ubuntu)
    dns proxy = no
    passdb backend = ldapsam:ldap://localhost/
    
    obey pam restrictions = no
    #Begin: Custom LDAP Entries
    ldap admin dn = cn=admin,dc=ddiscovery,dc=local
    ldap suffix = dc=ddiscovery, dc=local
    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
    # End: Custom LDAP Entries
    
      invalid users = root
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\sUNIX\spassword:* %n\n Retype\snew\sUNIX\spassword:* %n\n passwd:*password\supdated\ssuccessfully* .
    logon path =
    
    # Other parameters have default configuration
    
    
    I'll apreciate any help!!!


    PD: sorry abount my english.
     
  2. o.meyer

    o.meyer HowtoForge Supporter

    Hi agarcia71,

    please paste the output of

    Code:
    cat /etc/smbldap-tools/smbldap_bind.conf
    Best regards,

    Olli
     
  3. agarcia71

    agarcia71 New Member

    Hi o.meyer

    We found that the daemons smb and nmbd starts but they are didn't listen, and when we restart both daemons again we got this error:

    Code:
    admon@ldap$ sudo /etc/init.d/samba restart
     * Stopping Samba daemons...
    start-stop-daemon: warning: failed to kill 3865: No such process            
                                                                                                       [OK]
     * Starting Samba daemons                                                              [OK]
    admon@ldap$
    
    Thanks

    aGarcia71
     
  4. agarcia71

    agarcia71 New Member

    Hi o.meyer

    We think the problem is on smb.conf because after restoring the original configuration for smb.conf the daemons work.

    But we still don't found the solution.
     
  5. agarcia71

    agarcia71 New Member

    Help !!!

    Plz Help:

    This is netstat before doing the smb.conf modification:

    Code:
    admon@ldap:/etc/samba$ sudo netstat -puta
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
    tcp        0      0 *:ldap                  *:*                     LISTEN     4888/slapd          
    tcp        0      0 *:netbios-ssn           *:*                     LISTEN     5464/smbd           
    tcp        0      0 *:microsoft-ds          *:*                     LISTEN     5464/smbd           
    tcp6       0      0 *:ldap                  *:*                     LISTEN     4888/slapd          
    tcp6       0      0 *:ssh                   *:*                     LISTEN     3826/sshd           
    tcp6       0      0 ldap:ssh                ::ffff:10.2.7.1%8:53139 ESTABLISHED4895/sshd: admon [p 
    udp        0      0 ldap:netbios-ns         *:*                                5462/nmbd           
    udp        0      0 *:netbios-ns            *:*                                5462/nmbd           
    udp        0      0 ldap:netbios-dgm        *:*                                5462/nmbd           
    udp        0      0 *:netbios-dgm           *:*                                5462/nmbd           
    

    doing the step 5 when I restart the samba daemon got this error:

    Code:
    admon@ldap:/etc/samba$ sudo /etc/init.d/samba restart
     * Stopping Samba daemons...                                                                                                 start-stop-daemon: warning: failed to kill 5279: No such process             [ OK ]                                                                                                                     
     * Starting Samba daemons                                                               [ OK ] 
    
    Then I run next command:
    Code:
    admon@ldap:/etc/samba$ sudo netstat -puta
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
    tcp        0      0 *:ldap                  *:*                     LISTEN     4888/slapd          
    tcp        0      0 localhost:36848         localhost:ldap          TIME_WAIT  -                   
    tcp6       0      0 *:ldap                  *:*                     LISTEN     4888/slapd          
    tcp6       0      0 *:ssh                   *:*                     LISTEN     3826/sshd           
    tcp6       0      0 ldap:ssh                ::ffff:10.2.7.1%8:53139 ESTABLISHED4895/sshd: admon [p 
    udp        0      0 ldap:netbios-ns         *:*                                5320/nmbd           
    udp        0      0 *:netbios-ns            *:*                                5320/nmbd           
    udp        0      0 ldap:netbios-dgm        *:*                                5320/nmbd           
    udp        0      0 *:netbios-dgm           *:*                                5320/nmbd           
    admon@ldap:/etc/samba$ 
    
    I Can't see the smb daemon running :(

    This is again my smb.conf
    Code:
    [global]
    
    workgroup = DDISCOVERY
    server string = Domain Server (Samba, Ubuntu)
    dns proxy = no
    passdb backend = ldapsam:ldap://localhost/
    
    obey pam restrictions = no
    #Begin: Custom LDAP Entries
    ldap admin dn = cn=admin,dc=ddiscovery,dc=local
    ldap suffix = dc=ddiscovery, dc=local
    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
    # End: Custom LDAP Entries
    
      invalid users = root
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\sUNIX\spassword:* %n\n Retype\snew\sUNIX\spassword:* %n\n passwd:*password\supdated\ssuccessfully* .
    logon path =
    
    # Other parameters have default configuration
    I still don't know what is the problem, please helpme

    Best regards,

    aGarcia71:confused:
     
  6. o.meyer

    o.meyer HowtoForge Supporter

    Hi agarcia71,

    please try this global section:

    Code:
    [global]
            workgroup = DDISCOVERY
            netbiosname = PDC-SRV-DDISCOVERY
            preferred master = yes
            os level = 65
            wins support = yes
            enable privileges = yes
            timeserver = yes
    	socket options = SO_KEEPALIVE IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
            log level = 3
            null passwords = yes
            # unix charset = ISO8859-1
            name resolve order = bcast host
            domain logons = yes
            domain master = yes
            printing = cups
            printcap name = cups
            logon path = \\%N\profiles\%u
            logon script = logon.bat
    	logon drive = H:
            map acl inherit = yes
            nt acl support = yes
            passdb backend = ldapsam:ldap://127.0.0.1/
            obey pam restrictions = no
    
            ldap admin dn = cn=admin,dc=ddiscovery,dc=local
            ldap suffix = dc=ddiscovery,dc=local
            ldap group suffix = ou=Groups
            ldap user suffix = ou=Users
            ldap machine suffix = ou=Computers
            ldap idmap suffix = ou=Users
            ldap passwd sync = yes
            ldap delete dn = yes
    
            passwd program = /usr/sbin/smbldap-passwd -u %u
            passwd chat = "Changing password for*\nNew password*" %n\n "*Retype new password*" %n\n
    
            add user script = /usr/sbin/smbldap-useradd -m "%u"
            add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
            set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
            add group script = /usr/sbin/ambldap-groupadd -p "%g"
            add machine script = /usr/sbin/smbldap-useradd -w "%u"
    
            delete user script = /usr/sbin/smbldap-userdel "%u"
            delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
            delete group script = /usr/sbin/smbldap-groupdel "%g"
    Best regards,

    Olli
     
  7. agarcia71

    agarcia71 New Member

    Hi o.meyer:

    Just Copy & paste, exactly you said, but It doesn't work :S

    Thanks for your help, i will keep looking.
     
  8. o.meyer

    o.meyer HowtoForge Supporter

    Hi agarcia71,

    please test your samba configuration with the command

    Code:
    testparm
    This will show you possible errors in the configuration.

    Best regards,

    Olli
     
  9. agarcia71

    agarcia71 New Member

    Hi o.meyer

    Guess what!!!, Finally, the server is working, I Just follow all the steps from the howto, and it works!!!. But don't askme what whas the problem, because I don't know, i just follow the instruccions once more.
    Now I can connect the XP clients to the domain, now i have another problems:

    previusly, I setup a user, configure the workstation, that users didn't exist on the workstation, I get in, but the user is didn't created on the workstation. its that make sense ?.

    Sorry, about my english, I tryng to explain better I can.
     
  10. 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.
     
  11. alshira

    alshira New Member

    Solve

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

    in the /etc/samba/smb.conf
     
  12. sumerset

    sumerset New Member

    I have the same problem described here, but i have the invalid users = root commented on the smb.conf.

    what to do?
     
  13. sumerset

    sumerset New Member

    problem

    hi, i was able to pass the errors through that i had.

    Now i have another one. I can't seem to log in into the machine.

    Did i need to have a root account set up and a admin account in both ldap directory and the local machine?


    anyone a little help.

    A XP SP2 that i have can't find the domain as well.
     
  14. sumerset

    sumerset New Member

    Can anyone tell me what to write in these lines so that i can setup a domain with roaming profiles.


    smbldap.conf

    userSmbHome=
    userProfile=
    userHomeDrive=
    userScript=
     
  15. alshira

    alshira New Member

    like this

    This my copy of /etc/samba/smb.conf that let users log in into his "home" directory and automatically connect that directory into a drive called X:


    #
    # 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 = EBOR2

    # server string is the equivalent of the NT Description field
    server string = %h server (EBOR Linux Domain)

    # 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
    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 = tdbsam
    passdb backend = ldapsam:ldap://localhost/

    # obey pam restrictions = yes
    obey pam restrictions = no
    #######################################################################
    #COPY AND PASTE THE FOLLOWING UNDERNEATH "OBEY PAM RESTRICTIONS = NO"
    #######################################################################
    #
    # Begin: Custom LDAP Entries
    #
    ldap admin dn = cn=admin,dc=ebor2,dc=com
    ldap suffix = dc=ebor2, dc=com
    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
    #
    # End: Custom LDAP Entries
    #
    #####################################################
    #STOP COPYING HERE!
    #####################################################

    ; guest account = nobody
    ; invalid users = root
    ;logon path =

    # 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 <<kahan@informatik.tu-muenchen.de> 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
    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
    # Another common choice is storing the profile in the user's home directory
    ; logon path = \\%N\%U\profile
    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
    logon drive = X:
    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
    [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
    ;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
    writable = yes

    # 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
    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
    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




    [arquitectura]
    delete readonly = yes
    writeable = yes
    path = /disco_d/arquitectura
    force directory mode = 777
    force group = nogroup
    force create mode = 777
    force user = nobody
    comment = Proyectos de Arquitectura
    valid users = ccervantes,emartinez,gmontano,mreyes,mtrejo,ojuarez,openldap,sgarcia,rflores,@"Domain Users"
    create mode = 777
    directory mode = 777

    [Contabilidad]
    comment = Contabilidad Grupo Ebor
    writeable = yes
    valid users = cgiordano,eojeda,evaldes,pnieves,ccervantes,asanchez
    path = /disco_d/contabilidad



    [vicepresidencia]
    comment = Documentos de Vicepresidencia
    writeable = yes
    valid users = asanchez,ccervantes,eborbolla,fgarcia,hrubio,jnava
    path = /disco_d/vicepresidencia
     
  16. sumerset

    sumerset New Member

    Thanks,

    can you post here your configurations for the smbldap.conf file?
     
  17. alshira

    alshira New Member

    of curse but it's empty

    # $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
    SID="S-1-5-21-2360033818-3055828311-4012445347"

    # Domain name the Samba server is in charged.
    # If not defined, parameter is taking from smb.conf configuration file
    # Ex: sambaDomain="IDEALX-NT"
    sambaDomain="EBOR2"

    ##############################################################################
    #
    # 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=ebor2,dc=com"

    # 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=EBOR2,${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"
    #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"
    #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:"
    #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
    #userScript="logon.bat"
    userScript=

    # Domain appended to the users "mail"-attribute
    # when smbldap-useradd -M is used
    # Ex: mailDomain="idealx.com"
    mailDomain="ebor.com"

    ##############################################################################
    #
    # 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"
     
  18. sumerset

    sumerset New Member

    Hi,

    after doing step 10, 11, 12 from the how-to, and doing a reboot the machine simply denies every connection to it.

    I configured every thing like in the how-to (users, domain name, etc).

    Can you tell me if you set-up the dns server on the domain controller?
     
  19. sumerset

    sumerset New Member

    I know what i did wrong in the dns server.

    I had forgot to change the ip address on the resolv.conf

    But how do i configure the resolv.conf and the dns server to look for domains in itself and on another dns server?

    I wanted to instruct the dns server to look for dns in itself and on the dns of a router. And do this for dns server itself so that machine connected to him would do the same lookup.
     
  20. theHighlander_81

    theHighlander_81 New Member

    Hi All,

    I am replying on this thread as its under the same subject.

    I followed the above mentioned tutorial to the T. I even installed a box from scratch to test that it works.

    Now everything goes fine except for the final step, and that is authenticating a share from samba. I would like a certain share to be only available to a certain group.

    So as mentioned, i did everything from the tutorial, but added the step

    smbldap-groupmod -m ricky "Domain Users"

    I then created a share in samba like so :
    [Docs]
    comment = Docs
    writable = yes
    path = /media/docs
    public = yes
    browseable = yes
    create mask = 0777
    read only = no
    valid users = @"Domain Users"

    Forgive me if i am being an idoit here, but from my understanding, ricky is a user in LDAP, and also a meember of the Domain Users group, but when I try and access the share, it keeps asking for a username and password, and the username and password set up from LDAP for ricky doesn't work.

    I know LDAP works fine, and samba works fine (if i take valid users out i can access the share.) Am i missing anything?

    Thanks!
     

Share This Page