Discussion:
samba-ldap / Create demo user accout with smbldap-tools
(te oud om op te antwoorden)
Marinus
2010-08-23 12:14:42 UTC
Permalink
Goedemiddag allen,

Ik ben weer met onderstaande url verder gegaan, maar deze keer niet met
Lenny maar met squeeze

http://edin.no-ip.com/content/ldap-samba-pdc-pamnss-debian-lenny-howto

ik ben nu aangekomen tot en met:
Test your setup
---------------

Create demo user accout with smbldap-tools:
smbldap-useradd -a -m postmaster
smbldap-passwd postmaster
Check your user and group lookup. You should find the record from LDAP
accordingly:
getent passwd
getent group


Er gaat iets niet goed met met het aanmaken van bovengenoemde user
postmaster. Hierbij krijg ik de melding:

Error looking for next uid in
sambaDomainName=M31GALAXY,dc=m31galaxy,dc=nl:No such object at
/usr/share/perl5/smbldap_tools.pm line 1174.
deb6:/home/marinus# pico /usr/share/perl5/smbldap_tools.pm


Gedeelte van /usr/share/perl5/smbldap_tools.pm

~
~
~
do {
$next_uid_mesg = $ldap->search(
base => $config{sambaUnixIdPooldn},
filter => "(objectClass=sambaUnixIdPool)",
scope => "base"
);
$next_uid_mesg->code #line 1174
&& die "Error looking for next uid in "
. $config{sambaUnixIdPooldn} . ":"
. $next_uid_mesg->error;
if ( $next_uid_mesg->count != 1 ) {
~
~
~

Aangezien ik geen ervaring met de code van line 1174 vraag ik maar aan
jullie wat het zou moeten inhouden.

zou het kunnnen zijn dat de gebuiker postmaster ook in het bestand
/etc/passwd en /etc/group bekend moet zijn. Er wordt een melding gemaakt
dat de user het object niet bestaat.


met vriendelijke groeten,
Marinus
Cor Gest
2010-08-23 13:22:07 UTC
Permalink
Some entity, AKA Marinus <***@no-spamm.nl>,
wrote this mindboggling stuff:
(selectively-snipped-or-not-p)
Post by Marinus
smbldap-useradd -a -m postmaster
smbldap-passwd postmaster
Check your user and group lookup. You should find the record from LDAP
getent passwd
getent group
Er gaat iets niet goed met met het aanmaken van bovengenoemde user
Je gebruik van user "postmaster" is niet de slimste , aangezien deze een
al een homeless mail-alias is op elk linux-systeem dat ik ken, dus dit
zal altijd falen.
voor test-accounts "leuketestynaam" als user handiger

Cor
--
Geavanceerde politieke correctheid is niet te onderscheiden van sarcasme
If you hate to see my gun consider a non criminal line of work
The only good message from a spammer is a obituary
I really do not give a damn about ANY mail
Marinus
2010-08-24 13:56:13 UTC
Permalink
Post by Cor Gest
(selectively-snipped-or-not-p)
Post by Marinus
smbldap-useradd -a -m postmaster
smbldap-passwd postmaster
Check your user and group lookup. You should find the record from LDAP
getent passwd
getent group
Er gaat iets niet goed met met het aanmaken van bovengenoemde user
Je gebruik van user "postmaster" is niet de slimste , aangezien deze een
al een homeless mail-alias is op elk linux-systeem dat ik ken, dus dit
zal altijd falen.
voor test-accounts "leuketestynaam" als user handiger
Cor
Wat betreft user postmaster,.....ik ben het helemaal met je eens en in
eerste instantie had ik ook een user willen proberen aan te maken met
het commando smbldap-useradd -a -m test1. Echter ook bij het aanmaken
van user1 kreeg ik dezelfde melding als bij het aanmaken van user
postmaster.

Dus, kom ik weer uit bij /usr/share/perl5/smbldap_tools.pm
m.b.t. dat stukje code:
$next_uid_mesg->code #line 1174

M.v.g.,
Marinus
Cor Gest
2010-08-24 14:14:27 UTC
Permalink
Some entity, AKA Marinus <***@no-spamm.nl>,
wrote this mindboggling stuff:
(selectively-snipped-or-not-p)
Post by Marinus
Wat betreft user postmaster,.....ik ben het helemaal met je eens en in
eerste instantie had ik ook een user willen proberen aan te maken met
het commando smbldap-useradd -a -m test1. Echter ook bij het aanmaken
van user1 kreeg ik dezelfde melding als bij het aanmaken van user
postmaster.
Dus, kom ik weer uit bij /usr/share/perl5/smbldap_tools.pm
$next_uid_mesg->code #line 1174
geen flauw idee, windows, samba en ldap zijn me nog vreemder dan
vrijwillig belasting betalen.

Cor
--
Geavanceerde politieke correctheid is niet te onderscheiden van sarcasme
If you hate to see my gun consider a non criminal line of work
The only good message from a spammer is a obituary
I really do not give a damn about ANY mail
Marinus
2010-08-24 15:07:38 UTC
Permalink
Post by Cor Gest
(selectively-snipped-or-not-p)
Post by Marinus
Wat betreft user postmaster,.....ik ben het helemaal met je eens en in
eerste instantie had ik ook een user willen proberen aan te maken met
het commando smbldap-useradd -a -m test1. Echter ook bij het aanmaken
van user1 kreeg ik dezelfde melding als bij het aanmaken van user
postmaster.
Dus, kom ik weer uit bij /usr/share/perl5/smbldap_tools.pm
$next_uid_mesg->code #line 1174
geen flauw idee, windows, samba en ldap
zijn me nog vreemder dan
Post by Cor Gest
vrijwillig belasting betalen.
Cor
LOL , daar doe ik niet hoor. dr worden tegenwoordig nog veel te veel
bonussen uitgekeerd.

M.v.g.,
Marinus
tjoen
2010-08-23 16:57:43 UTC
Permalink
Post by Marinus
http://edin.no-ip.com/content/ldap-samba-pdc-pamnss-debian-lenny-howto
Test your setup
---------------
smbldap-useradd -a -m postmaster
Zoals Cor schreef vreemd om "postmaster" te gebruiken,
maar het staat eenmaal zo op die webpagina
Post by Marinus
Error looking for next uid in sambaDomainName=M31GALAXY,dc=m31galaxy,dc=nl:No such object at /usr/share/perl5/smbldap_tools.pm line 1174.
Ik mis wel iets op die pagina: /etc/smbldap-tools/configure.pl
Mogelijk al door Debian ingevuld.

Runt slapd?
Marinus
2010-08-24 14:07:36 UTC
Permalink
Post by tjoen
Post by Marinus
http://edin.no-ip.com/content/ldap-samba-pdc-pamnss-debian-lenny-howto
Test your setup
---------------
smbldap-useradd -a -m postmaster
Zoals Cor schreef vreemd om "postmaster" te gebruiken,
maar het staat eenmaal zo op die webpagina
Post by Marinus
Er gaat iets niet goed met met het aanmaken van bovengenoemde user
Error looking for next uid in
sambaDomainName=M31GALAXY,dc=m31galaxy,dc=nl:No such object at
/usr/share/perl5/smbldap_tools.pm line 1174.
Ik mis wel iets op die pagina: /etc/smbldap-tools/configure.pl
Mogelijk al door Debian ingevuld.
Runt slapd?
klopt. ik heb gekeken in map /etc/smbldap-tools/ , en in deze map komt
niet dat *.pl bestand voor.
Post by tjoen
Runt slapd?
ja, heb het o.a. gecontrolleerd met pstree

├─slapd───4*[{slapd}]

Misschien dat er nog andere tools geinstalleerd moeten worden waarin
configure.pl voorkomt. Ik ga effetjes verder zoeken

alsnog bedankt voor je reactie.

M.v.g.,
Marinus
Marinus
2010-08-24 15:03:59 UTC
Permalink
Post by tjoen
Ik mis wel iets op die pagina: /etc/smbldap-tools/configure.pl
Mogelijk al door Debian ingevuld.
ik heb nog extra gecontroleerd of de smbldap-tools geintstalleerd waren
en dat was het geval.....Maar waarom die configure.pl dan niet voorkomt
is mij een raadsel.

Verder heb ik nog migrationtools geinstalleerd voor ldap, echter, daarin
komt dat bestand ook niet voor.

M.v.g.,
Marinus
tjoen
2010-08-24 16:51:51 UTC
Permalink
Post by tjoen
Ik mis wel iets op die pagina: /etc/smbldap-tools/configure.pl
Mogelijk al door Debian ingevuld.
ik heb nog extra gecontroleerd of de smbldap-tools geintstalleerd waren en dat was het geval.....Maar waarom die configure.pl dan niet voorkomt is mij een raadsel.
Mogelijk heeft Debian een andere tool.
Heb je gekeken of /etc/smbldap-tools/smbldap.conf en smbldap_bind.conf
correct geconfigureerd zijn door die Debian-tools?

Verder raad ik ook aan
http://localhost:901/swat/help/Samba3-ByExample/happy.html
te lezen, hoewel samba de laatste keer dat ik dat probeerde het
niet deed zoals beschreven
Marinus
2010-08-25 07:09:39 UTC
Permalink
Post by tjoen
Post by Marinus
Post by tjoen
Ik mis wel iets op die pagina: /etc/smbldap-tools/configure.pl
Mogelijk al door Debian ingevuld.
ik heb nog extra gecontroleerd of de smbldap-tools geintstalleerd
waren en dat was het geval.....Maar waarom die configure.pl dan niet
voorkomt is mij een raadsel.
Mogelijk heeft Debian een andere tool.
Heb je gekeken of /etc/smbldap-tools/smbldap.conf en smbldap_bind.conf
correct geconfigureerd zijn door die Debian-tools?
Voorzover ik er enigszins iets van weet heb ik ze alleen aangepast zodat
ze van toepassing zijn op mijn domeinnaam. Misschien zie jij nog iets
wat ik vergeten ben of niet goed heb aangepast.

cat /etc/smbldap-tools/smbldap.conf
-------------------------------------

# $Source: $
# $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-1169193956-4199179787-2206793627" deze dient als v.b.
# nieuwe gemaakt door Marinus 22-aug-2010
SID="S-1-5-21-1913666496-2237828003-1976405768"

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

##############################################################################
#
# 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" ....N.V.T.....by Marinus

# Slave LDAP port
# If not defined, parameter is set to "389"
## slavePort="389" .......N.V.T......by Marinus

# 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/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/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/smbldap-tools/smbldap-tools.key"

# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=m31galaxy,dc=nl"

# 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=people,${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=computer,${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=group,${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=${sambaDomain},${suffix}"

# Default scope Used
scope="sub"

# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="MD5"

# 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="365"

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

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

# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="U:"

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

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

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

deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
--------------------------------------------------------

# $Source: $
# $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-1169193956-4199179787-2206793627" deze dient als v.b.
# nieuwe gemaakt door Marinus 22-aug-2010
SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"

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

##############################################################################
#
# 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" ....N.V.T.....

# Slave LDAP port
# If not defined, parameter is set to "389"
## slavePort="389" .......N.V.T......

# 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/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/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/smbldap-tools/smbldap-tools.key"

# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=m31galaxy,dc=nl"

# 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=people,${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=computer,${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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"


# 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}"
idmapdn="ou=idmap,dc=M31GALAXY,dc=NL"

# 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=${sambaDomain},${suffix}"

# Default scope Used
scope="sub"

# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="MD5"

# 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="365"

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

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

# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="U:"

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

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

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



deb6:/home/marinus# cat /etc/smbldap-tools/smbldap_bind.conf
-------------------------------------------------------------
############################
# 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)

# slaveDN="cn=Manager,dc=iallanis,dc=info" ....N.V.T.....
# slavePw="secret" ....N.V.T.....

masterDN="cn=admin,dc=m31galaxy,dc=nl"
masterPw="xxxxxx"
Post by tjoen
Verder raad ik ook aan
http://localhost:901/swat/help/Samba3-ByExample/happy.html
te lezen, hoewel samba de laatste keer dat ik dat probeerde het
niet deed zoals beschreven
Ik ben eerlijk gezegd helemaal niet zo'n voorstander van swat, mijn
ervaring is dat het de smb.conf nogal rommelig maakt / overhoop haalt.
En verder geef ik de voorkeur zoveel mogelijk met de commandline te werken.

je bedoelt dat je dezelde tutorial hebt gevolgd ?

M.v.g.,
Marinus
tjoen
2010-08-25 07:19:56 UTC
Permalink
Post by Marinus
Post by tjoen
Heb je gekeken of /etc/smbldap-tools/smbldap.conf en smbldap_bind.conf
correct geconfigureerd zijn door die Debian-tools?
cat /etc/smbldap-tools/smbldap.conf
...
Post by Marinus
deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
Liever met grep -v om alle lege regels en comments te verwijderen
Ik weet dat ik het zelf kan maar heb nu geen tijd
Post by Marinus
Post by tjoen
http://localhost:901/swat/help/Samba3-ByExample/happy.html
..
Post by Marinus
Ik ben eerlijk gezegd helemaal niet zo'n voorstander van swat, mijn ervaring is dat het de smb.conf nogal rommelig maakt / overhoop haalt.
En verder geef ik de voorkeur zoveel mogelijk met de commandline te werken.
Ik gebruik swat eigenlijk alleen om die docs te lezen
Post by Marinus
je bedoelt dat je dezelde tutorial hebt gevolgd ?
Alleen die happy.html
Sinds nieuwe openldap is er ergens een probleem
Marinus
2010-08-25 07:37:23 UTC
Permalink
Post by tjoen
Post by Marinus
Post by tjoen
Heb je gekeken of /etc/smbldap-tools/smbldap.conf en smbldap_bind.conf
correct geconfigureerd zijn door die Debian-tools?
cat /etc/smbldap-tools/smbldap.conf
...
Post by Marinus
deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
Liever met grep -v om alle lege regels en comments te verwijderen
Ik weet dat ik het zelf kan maar heb nu geen tijd
Post by Marinus
Post by tjoen
http://localhost:901/swat/help/Samba3-ByExample/happy.html
..
Post by Marinus
Ik ben eerlijk gezegd helemaal niet zo'n voorstander van swat, mijn
ervaring is dat het de smb.conf nogal rommelig maakt / overhoop haalt.
En verder geef ik de voorkeur zoveel mogelijk met de commandline te werken.
Ik gebruik swat eigenlijk alleen om die docs te lezen
Post by Marinus
je bedoelt dat je dezelde tutorial hebt gevolgd ?
Alleen die happy.html
Sinds nieuwe openldap is er ergens een probleem
hierbij nogmaals de *.conf bestanden

geef er, zodra je er tijd voor wilt nemen, maar commentaar / wijzigen op.

cat /etc/smbldap-tools/smbldap.conf
-------------------------------------

# $Source: $
# $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-1169193956-4199179787-2206793627" deze dient als v.b.
# nieuwe gemaakt door Marinus 22-aug-2010
SID="S-1-5-21-1913666496-2237828003-1976405768"

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

##############################################################################
#
# 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" ....N.V.T.....by Marinus

# Slave LDAP port
# If not defined, parameter is set to "389"
## slavePort="389" .......N.V.T......by Marinus

# 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/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/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/smbldap-tools/smbldap-tools.key"

# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=m31galaxy,dc=nl"

# 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=people,${suffix}"
usersdn="ou=people,dc=M31GALAXY,dc=NL"

# 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=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"

# 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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"

# 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}"
idmapdn="ou=idmap,dc=M31GALAXY,dc=NL"


# 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=${sambaDomain},${suffix}"

# Default scope Used
scope="sub"

# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="MD5"

# 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="365"

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

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

# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="U:"

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

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

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

deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
--------------------------------------------------------

# $Source: $
# $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-1169193956-4199179787-2206793627" deze dient als v.b.
# nieuwe gemaakt door Marinus 22-aug-2010
SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"

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

##############################################################################
#
# 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" ....N.V.T.....

# Slave LDAP port
# If not defined, parameter is set to "389"
## slavePort="389" .......N.V.T......

# 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/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/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/smbldap-tools/smbldap-tools.key"

# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=m31galaxy,dc=nl"

# 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=people,${suffix}"
usersdn="ou=people,dc=M31GALAXY,dc=NL"

# 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=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"

# 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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"


# 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}"
idmapdn="ou=idmap,dc=M31GALAXY,dc=NL"

# 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=${sambaDomain},${suffix}"

# Default scope Used
scope="sub"

# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="MD5"

# 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="365"

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

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

# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="U:"

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

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

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



deb6:/home/marinus# cat /etc/smbldap-tools/smbldap_bind.conf
-------------------------------------------------------------
############################
# 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)

# slaveDN="cn=Manager,dc=iallanis,dc=info" ....N.V.T.....
# slavePw="secret" ....N.V.T.....

masterDN="cn=admin,dc=m31galaxy,dc=nl"
masterPw="xxxxxx"

Nog bedankt voor je respons / reactie's

M.v.g.,
Marinus
Richard Lucassen
2010-08-25 08:23:27 UTC
Permalink
On Wed, 25 Aug 2010 09:19:56 +0200
Post by tjoen
Post by Marinus
cat /etc/smbldap-tools/smbldap.conf
...
Post by Marinus
deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
Liever met grep -v om alle lege regels en comments te verwijderen
Ik weet dat ik het zelf kan maar heb nu geen tijd
grep -v ^# smbldap.conf | sed -e 's/^$/d'

Geen idee of grep het sed deel ook aan kan (te lui om te zoeken) maar
dit werkt iig.

R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Richard Lucassen
2010-08-25 08:35:05 UTC
Permalink
On Wed, 25 Aug 2010 10:23:27 +0200
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e 's/^$/d'
Oeps:

grep -v ^# smbldap.conf | sed -e '/^$/d'

R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Marinus
2010-08-25 11:16:39 UTC
Permalink
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e '/^$/d'
klopt, deze doet het (met pad aangegeven)
grep -v ^# /etc/smbldap-tools/smbldap.conf | sed -e '/^$/d'

SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"
sambaDomain="M31GALAXY"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
verify="require"
cafile="/etc/smbldap-tools/ca.pem"
clientcert="/etc/smbldap-tools/smbldap-tools.pem"
clientkey="/etc/smbldap-tools/smbldap-tools.key"
suffix="dc=m31galaxy,dc=nl"
usersdn="ou=people,${suffix}"
computersdn="ou=computer,${suffix}"
groupsdn="ou=group,${suffix}"
idmapdn="ou=idmap,${suffix}"
sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
scope="sub"
hash_encrypt="MD5"
crypt_salt_format="%s"
userLoginShell="/bin/bash"
userHome="/home/%U"
userHomeDirectoryMode="700"
userGecos="System User"
defaultUserGid="513"
defaultComputerGid="515"
skeletonDir="/etc/skel"
defaultMaxPasswordAge="365"
userSmbHome=""
userProfile=""
userHomeDrive="U:"
userScript="logon.bat"
mailDomain="m31galaxy.nl"
with_smbpasswd="0"
smbpasswd="/usr/bin/smbpasswd"
with_slappasswd="0"
slappasswd="/usr/sbin/slappasswd"



bedankt voor het meedenken

M.v.g.,
Marinus




www.tuxdesktop.nl
Marinus
2010-08-25 11:27:10 UTC
Permalink
Post by Marinus
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e '/^$/d'
klopt, deze doet het (met pad aangegeven)
grep -v ^# /etc/smbldap-tools/smbldap.conf | sed -e '/^$/d'
SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"
sambaDomain="M31GALAXY"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
verify="require"
cafile="/etc/smbldap-tools/ca.pem"
clientcert="/etc/smbldap-tools/smbldap-tools.pem"
clientkey="/etc/smbldap-tools/smbldap-tools.key"
suffix="dc=m31galaxy,dc=nl"
usersdn="ou=people,${suffix}"
computersdn="ou=computer,${suffix}"
groupsdn="ou=group,${suffix}"
idmapdn="ou=idmap,${suffix}"
sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
scope="sub"
hash_encrypt="MD5"
crypt_salt_format="%s"
userLoginShell="/bin/bash"
userHome="/home/%U"
userHomeDirectoryMode="700"
userGecos="System User"
defaultUserGid="513"
defaultComputerGid="515"
skeletonDir="/etc/skel"
defaultMaxPasswordAge="365"
userSmbHome=""
userProfile=""
userHomeDrive="U:"
userScript="logon.bat"
mailDomain="m31galaxy.nl"
with_smbpasswd="0"
smbpasswd="/usr/bin/smbpasswd"
with_slappasswd="0"
slappasswd="/usr/sbin/slappasswd"
bedankt voor het meedenken
M.v.g.,
Marinus
www.tuxdesktop.nl
correctie toegepast op de regels: (waar ${suffix} in voorkwam)

suffix="dc=m31galaxy,dc=nl"
usersdn="ou=people,dc=M31GALAXY,dc=NL"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"
idmapdn="ou=idmap,dc=M31GALAXY,dc=NL"


M.v.g.,
Marinus
Marinus
2010-08-25 12:01:02 UTC
Permalink
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e '/^$/d'
effetjes een correctie toegepast m.b.t. de regels waarin ${suffix} voorkomt.

suffix="dc=m31galaxy,dc=nl"

# 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=people,${suffix}"
usersdn="ou=people,dc=M31GALAXY,dc=NL"

# 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=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"
# 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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"

# 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,dc=M31GALAXY,dc=NL"

# 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=${sambaDomain},${suffix}"

# Default scope Used

Bedankt voor het meedenken.

M.v.g.,
Marinus
tjoen
2010-08-25 17:15:42 UTC
Permalink
Post by Marinus
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e '/^$/d'
klopt, deze doet het (met pad aangegeven)
grep -v ^# /etc/smbldap-tools/smbldap.conf | sed -e '/^$/d'
SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"
sambaDomain="M31GALAXY"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
Misschien moeten deze tijdelijk "" zijn
BEGIN
Post by Marinus
verify="require"
cafile="/etc/smbldap-tools/ca.pem"
clientcert="/etc/smbldap-tools/smbldap-tools.pem"
clientkey="/etc/smbldap-tools/smbldap-tools.key"
END
Post by Marinus
suffix="dc=m31galaxy,dc=nl"
usersdn="ou=people,${suffix}"
Ik weet niet of ldap case sensitive is, maar bij mij staat People
Post by Marinus
computersdn="ou=computer,${suffix}"
Er was iets met de schemas, moet dat niet ou=People zijn?
Post by Marinus
groupsdn="ou=group,${suffix}"
Bij mij Groups, dus met "s"
Post by Marinus
idmapdn="ou=idmap,${suffix}"
Bij mij Idmap
Post by Marinus
sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
scope="sub"
hash_encrypt="MD5"
crypt_salt_format="%s"
Hier crypt_salt_format="" (schijnt default %s te zijn)
Post by Marinus
userLoginShell="/bin/bash"
userHome="/home/%U"
userHomeDirectoryMode="700"
userGecos="System User"
defaultUserGid="513"
defaultComputerGid="515"
skeletonDir="/etc/skel"
Rest knip, bij mij iets anders maar vast niet het probleem.

Lijkt dus probleem connectie/authenticatie met ldap
Is via logs misschien op te lossen, maar logging moet eerst aan.
Hoe dat moet staat in eerdergenoemde happy.html
Marinus
2010-08-26 11:06:49 UTC
Permalink
Post by tjoen
Post by Marinus
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e '/^$/d'
klopt, deze doet het (met pad aangegeven)
grep -v ^# /etc/smbldap-tools/smbldap.conf | sed -e '/^$/d'
SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"
sambaDomain="M31GALAXY"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
Misschien moeten deze tijdelijk "" zijn
klinkt aannemelijk, maar dit zijn de default_instellingen die ik aantrof
na installatie. ik wil proberen zoveel mogelijk deze
default_instellingen aanhouden. ik zou eventueel none of optional kunnen
proberen. En als het dan goed werkt de moeilijkheidsgraad verder
opbouwen om de beveiliging optimaal te krijgen en zodoende kom ik stap
voor stap, door te testen, bij de punten uit waar het eventueel niet
goed gaat.
Post by tjoen
BEGIN
Post by Marinus
verify="require"
cafile="/etc/smbldap-tools/ca.pem"
clientcert="/etc/smbldap-tools/smbldap-tools.pem"
clientkey="/etc/smbldap-tools/smbldap-tools.key"
END
Post by Marinus
suffix="dc=m31galaxy,dc=nl"
usersdn="ou=people,${suffix}"
usersdn="ou=People,dc=M31GALAXY,dc=NL"
Post by tjoen
Ik weet niet of ldap case sensitive is, maar bij mij staat People
hierop gegoogeld en blijkt case sensitive te zijn en verder staat in een
voorbeeld ook people zonder h.l.
Post by tjoen
Post by Marinus
computersdn="ou=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"
Post by tjoen
Er was iets met de schemas, moet dat niet ou=People zijn?
Post by Marinus
groupsdn="ou=group,${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=group,${suffix}"
groupsdn="ou=Groups,dc=M31GALAXY,dc=NL"
Post by tjoen
Bij mij Groups, dus met "s"
blijkbaar zijn Groups en group allebei mogelijk n.a.v. voorbeeld
Post by tjoen
Post by Marinus
idmapdn="ou=idmap,${suffix}"
Bij mij Idmap
# Where are stored Idmap entries (used if samba is a domain member server)
# Ex: groupsdn="ou=Idmap,dc=IDEALX,dc=ORG"
idmapdn="ou=Idmap,dc=M31GALAXY,dc=NL"
Post by tjoen
Post by Marinus
sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
scope="sub"
hash_encrypt="MD5"
crypt_salt_format="%s"
Hier crypt_salt_format="" (schijnt default %s te zijn)
# 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"
crypt_salt_format=""
deze zou dus inderdaad op "" ingesteld kunnen worden zoals ik het heb
begrepen = This parameter is optional! =
Post by tjoen
Post by Marinus
userLoginShell="/bin/bash"
userHome="/home/%U"
userHomeDirectoryMode="700"
userGecos="System User"
defaultUserGid="513"
defaultComputerGid="515"
skeletonDir="/etc/skel"
Rest knip, bij mij iets anders maar vast niet het probleem.
Lijkt dus probleem connectie/authenticatie met ldap
Is via logs misschien op te lossen, maar logging moet eerst aan.
Hoe dat moet staat in eerdergenoemde happy.html
Heb hier swat geinstalleerd maar heb verder geen happy.html kunnen
raadplegen. (kan het toch ten alle tijde disablen)

heb het volgende gedaan n.a.v. eerdere experimenten met ldap i.c.m. nfs

In /ets/syslog.conf:
local4.* /var/log/ldaplogs

en in
/etc/ldap/slapd.conf
loglevel 768

/etc/init.d/rsyslog restart
Stopping enhanced syslogd: rsyslogd.
Starting enhanced syslogd: rsyslogd.

/etc/init.d/slapd restart
Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd.

tot dusver geen foutmeldingen

M.v.g.,
Marinus
tjoen
2010-08-26 16:51:01 UTC
Permalink
Post by Marinus
local4.* /var/log/ldaplogs
/etc/ldap/slapd.conf
loglevel 768
tot dusver geen foutmeldingen
Die komt waarschijnlijk wel als je die user toevoegt
Marinus
2010-08-27 12:09:25 UTC
Permalink
Post by tjoen
Post by Marinus
local4.* /var/log/ldaplogs
/etc/ldap/slapd.conf
loglevel 768
tot dusver geen foutmeldingen
Die komt waarschijnlijk wel als je die user toevoegt
inderdaad,...bij deze,...


deb6:/etc# smbldap-useradd -a -m test1
Error looking for next uid in
sambaDomainName=M31GALAXY,dc=m31galaxy,dc=nl:No such object at
/usr/share/perl5/smbldap_tools.pm line 1174.

Gedeelte van /usr/share/perl5/smbldap_tools.pm
~
do {
$next_uid_mesg = $ldap->search(
base => $config{sambaUnixIdPooldn},
filter => "(objectClass=sambaUnixIdPool)",
scope => "base"
);
$next_uid_mesg->code #line 1174
&& die "Error looking for next uid in "
. $config{sambaUnixIdPooldn} . ":"
. $next_uid_mesg->error;
if ( $next_uid_mesg->count != 1 ) {
~



cat /var/log/ldaplogs
~
~
~
Aug 27 13:59:16 deb6 slapd[1213]: conn=147 fd=18 ACCEPT from
IP=127.0.0.1:34593 (IP=0.0.0.0:389)
Aug 27 13:59:16 deb6 slapd[1213]: conn=147 op=0 BIND
dn="cn=admin,dc=m31galaxy,dc=nl" method=128
Aug 27 13:59:16 deb6 slapd[1213]: conn=147 op=0 RESULT tag=97 err=49 text=
Aug 27 13:59:16 deb6 slapd[1213]: conn=147 op=1 UNBIND
Aug 27 13:59:16 deb6 slapd[1213]: conn=147 fd=18 closed
~
~
~
deb6:/etc#

Taaie materie

Ik ga nog maar es effetjes verder kijken in de manpages , google etc


M.v.g.,
Marinus
tjoen
2010-08-27 16:55:47 UTC
Permalink
On 08/25/10 13:16, Marinus wrote:
...
Post by Marinus
sambaDomain="M31GALAXY"
...
Post by Marinus
suffix="dc=m31galaxy,dc=nl"
...
Post by Marinus
sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
..

Volgens mij zit de fout hier
Marinus
2010-08-28 12:33:00 UTC
Permalink
Post by tjoen
...
Post by Marinus
sambaDomain="M31GALAXY"
...
Post by Marinus
suffix="dc=m31galaxy,dc=nl"
...
Post by Marinus
sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
..
Volgens mij zit de fout hier
pico /etc/smbldap-tools/smbldap.conf

sambaUnixIdPooldn="M31GALAXY=${sambaDomain},${suffix}"

/etc/init.d/slapd restart

deb6:/home/marinus# smbldap-useradd -a -m test2

levert de onderstaande fout op

Error looking for next uid in
M31GALAXY=M31GALAXY,dc=m31galaxy,dc=nl:invalid DN at
/usr/share/perl5/smbldap_tools.pm line 1174.

--------------------------------

sambaUnixIdPooldn="sambaDomainName=M31GALAXY,dc=m31galaxy,dc=nl"

/etc/init.d/slapd restart

deb6:/home/marinus# smbldap-useradd -a -m test2

levert de onderstaande fout op

Error looking for next uid in
sambaDomainName=M31GALAXY,dc=m31galaxy,dc=nl:No such object at
/usr/share/perl5/smbldap_tools.pm line 1174.
---------------------------------------------------------------

sambaUnixIdPooldn="dn=M31GALAXY,dc=m31galaxy,dc=nl"

/etc/init.d/slapd restart

deb6:/home/marinus# smbldap-useradd -a -m test2

levert de onderstaande fout op

Error looking for next uid in dn=M31GALAXY,dc=m31galaxy,dc=nl:invalid DN
at /usr/share/perl5/smbldap_tools.pm line 1174.
---------------------------------------------------------------

sambaUnixIdPooldn="M31GALAXY,dc=m31galaxy,dc=nl"

/etc/init.d/slapd restart

deb6:/home/marinus# smbldap-useradd -a -m test2

levert de onderstaande fout op


Error looking for next uid in M31GALAXY,dc=m31galaxy,dc=nl:invalid DN at
/usr/share/perl5/smbldap_tools.pm line 1174.
-------------------------------------------------------------------

Tot dusver nog niet het gewenste resultaat opgebracht.

Ik ga verder op onderzoek uit

Bedankt voorzover voor je support.
Marinus
Richard Lucassen
2010-08-28 15:11:36 UTC
Permalink
On Sat, 28 Aug 2010 14:33:00 +0200
Post by Marinus
Error looking for next uid in M31GALAXY,dc=m31galaxy,dc=nl:invalid DN
at /usr/share/perl5/smbldap_tools.pm line 1174.
Als ik dit voer aan Google krijg ik 213 hits:

/usr/share/perl5/smbldap_tools.pm line 1174

Verder niet gezocht, maar je bent vast niet de enige met dat
probleem ;-)

R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Marinus
2010-08-29 16:46:26 UTC
Permalink
Post by Richard Lucassen
On Sat, 28 Aug 2010 14:33:00 +0200
Post by Marinus
Error looking for next uid in M31GALAXY,dc=m31galaxy,dc=nl:invalid DN
at /usr/share/perl5/smbldap_tools.pm line 1174.
/usr/share/perl5/smbldap_tools.pm line 1174
Verder niet gezocht, maar je bent vast niet de enige met dat
probleem ;-)
R.
ik weet het wel haast zeker. Maar goed , ik ga ook nog effe verder
kijken want heb tot dusver het probleem niet kunnen oplossen.

Bedankt voor je support,

Marinus

Marinus
2010-08-25 11:57:08 UTC
Permalink
Post by Richard Lucassen
On Wed, 25 Aug 2010 10:23:27 +0200
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e 's/^$/d'
grep -v ^# smbldap.conf | sed -e '/^$/d'
R.
Even een correctie toegepast m.b.t. de ${suffix} regels
voorzover ik het heb begrepen.



suffix="dc=m31galaxy,dc=nl"

# 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=people,${suffix}"
usersdn="ou=people,dc=M31GALAXY,dc=NL"

# 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=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"
# 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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"

# 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,dc=M31GALAXY,dc=NL"

# 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=${sambaDomain},${suffix}"


Bedankt voor het meedenken.
M.v.g.,
Marinus
Johan van Selst
2010-08-25 08:48:48 UTC
Permalink
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e 's/^$/d'
Geen idee of grep het sed deel ook aan kan (te lui om te zoeken) maar
dit werkt iig.
Ja, dit kan ook met alleen grep of juist alleen sed,
$ grep -vE '^#|^$' smbldap.conf
$ sed '/^$/d;/^#/d' smbldap.conf

En als je sed -E of -r gebruikt (afhankelijk van het geïnstalleerde
smaakje), dan werkt '/^#|^$d/' ook.


Ciao,
Johan
--
Why do we always come here - I guess we'll never know.
It's like a kind of torture to have to watch the show.
Marinus
2010-08-25 11:11:42 UTC
Permalink
Post by Richard Lucassen
On Wed, 25 Aug 2010 09:19:56 +0200
Post by tjoen
Post by Marinus
cat /etc/smbldap-tools/smbldap.conf
...
Post by Marinus
deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
Liever met grep -v om alle lege regels en comments te verwijderen
Ik weet dat ik het zelf kan maar heb nu geen tijd
grep -v ^# smbldap.conf | sed -e 's/^$/d'
Geen idee of grep het sed deel ook aan kan (te lui om te zoeken) maar
dit werkt iig.
R.
deb6:/# grep -v ^# /etc/smbldap-tools/smbldap.conf | sed -e 's/^$/d'
sed: -e expression #1, char 6: unterminated `s' command

helaas niet dus.

bedankt voor het meedenken.

M.v.g.,
Marinus





www.tuxdesktop.nl
Fred Mobach
2010-08-26 11:44:28 UTC
Permalink
Post by Richard Lucassen
On Wed, 25 Aug 2010 09:19:56 +0200
Post by tjoen
Post by Marinus
cat /etc/smbldap-tools/smbldap.conf
...
Post by Marinus
deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
Liever met grep -v om alle lege regels en comments te verwijderen
Ik weet dat ik het zelf kan maar heb nu geen tijd
grep -v ^# smbldap.conf | sed -e 's/^$/d'
Geen idee of grep het sed deel ook aan kan (te lui om te zoeken) maar
dit werkt iig.
Dat heefy iets met de UNIX shell te maken, niet met grep of sed.

Tussen die twee zet je een pipe, hetgeen betekent dat de stdout van grep
door die shell naar een (uitvoer) pipe wordt gelegd welke dan door de
stdin van sed wordt ingelezen. Of het hiermee goed verwoord is is een
ander verhaal.
--
Fred Mobach - ***@mobach.nl
website : https://fred.mobach.nl
.... In God we trust ....
.. The rest we monitor ..
Richard Lucassen
2010-08-26 11:50:06 UTC
Permalink
On Thu, 26 Aug 2010 13:44:28 +0200
Post by Fred Mobach
Post by Richard Lucassen
grep -v ^# smbldap.conf | sed -e 's/^$/d'
Geen idee of grep het sed deel ook aan kan (te lui om te zoeken)
maar dit werkt iig.
Dat heefy iets met de UNIX shell te maken, niet met grep of sed.
Tussen die twee zet je een pipe, hetgeen betekent dat de stdout van
grep door die shell naar een (uitvoer) pipe wordt gelegd welke dan
door de stdin van sed wordt ingelezen. Of het hiermee goed verwoord
is is een ander verhaal.
Dat snap ik, maar ik vroeg me af of alleen grep of alleen sed het ook
kon zonder pipe. Sed kan het dus iig wel, was alleen te lui om het uit
te zoeken. Kennelijk wilde ik onbewust genomineerd worden voor "The
Useless Use Of Pipes Award" :)
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Marinus
2010-08-25 07:28:33 UTC
Permalink
Post by tjoen
Post by Marinus
Post by tjoen
Ik mis wel iets op die pagina: /etc/smbldap-tools/configure.pl
Mogelijk al door Debian ingevuld.
ik heb nog extra gecontroleerd of de smbldap-tools geintstalleerd
waren en dat was het geval.....Maar waarom die configure.pl dan niet
voorkomt is mij een raadsel.
Mogelijk heeft Debian een andere tool.
Heb je gekeken of /etc/smbldap-tools/smbldap.conf en smbldap_bind.conf
correct geconfigureerd zijn door die Debian-tools?
heb ik gedaan en hier en daar kleine wijzigingen gemaakt die van
toepassing zijn op mijn eigen situatie.
Maar misschien zie jij nog iets verkeerd staan waar ik overheen heb gekeken.

cat /etc/smbldap-tools/smbldap.conf
-------------------------------------

# $Source: $
# $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-1169193956-4199179787-2206793627" deze dient als v.b.
# nieuwe gemaakt door Marinus 22-aug-2010
SID="S-1-5-21-1913666496-2237828003-1976405768"

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

##############################################################################
#
# 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" ....N.V.T.....by Marinus

# Slave LDAP port
# If not defined, parameter is set to "389"
## slavePort="389" .......N.V.T......by Marinus

# 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/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/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/smbldap-tools/smbldap-tools.key"

# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=m31galaxy,dc=nl"

# 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=people,${suffix}"
usersdn="ou=people,dc=M31GALAXY,dc=NL"

# 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=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"

# 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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"

# 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}"
idmapdn="ou=idmap,dc=M31GALAXY,dc=NL"


# 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=${sambaDomain},${suffix}"

# Default scope Used
scope="sub"

# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="MD5"

# 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="365"

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

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

# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="U:"

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

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

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

deb6:/home/marinus# cat /etc/smbldap-tools/smbldap.conf
--------------------------------------------------------

# $Source: $
# $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-1169193956-4199179787-2206793627" deze dient als v.b.
# nieuwe gemaakt door Marinus 22-aug-2010
SID="S-1-5-21-1913666XXX-2237828XXX-1976405XXX"

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

##############################################################################
#
# 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" ....N.V.T.....

# Slave LDAP port
# If not defined, parameter is set to "389"
## slavePort="389" .......N.V.T......

# 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/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/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/smbldap-tools/smbldap-tools.key"

# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=m31galaxy,dc=nl"

# 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=people,${suffix}"
usersdn="ou=people,dc=M31GALAXY,dc=NL"

# 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=computer,${suffix}"
computersdn="ou=computer,dc=M31GALAXY,dc=NL"

# 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=group,${suffix}"
groupsdn="ou=group,dc=M31GALAXY,dc=NL"


# 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}"
idmapdn="ou=idmap,dc=M31GALAXY,dc=NL"

# 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=${sambaDomain},${suffix}"

# Default scope Used
scope="sub"

# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="MD5"

# 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="365"

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

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

# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="U:"

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

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

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



deb6:/home/marinus# cat /etc/smbldap-tools/smbldap_bind.conf
-------------------------------------------------------------
############################
# 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)

# slaveDN="cn=Manager,dc=iallanis,dc=info" ....N.V.T.....
# slavePw="secret" ....N.V.T.....

masterDN="cn=admin,dc=m31galaxy,dc=nl"
masterPw="xxxxxx"
Post by tjoen
Verder raad ik ook aan
http://localhost:901/swat/help/Samba3-ByExample/happy.html
te lezen, hoewel samba de laatste keer dat ik dat probeerde het
niet deed zoals beschreven
Eerlijk gezegd ben ik niet zo'n liefhebber van swat, het haalt je hele
smb.conf overhoop en bovendien geef ik de voorkeur aan de commandline.

M.v.g.,
Marinus
Loading...