AceTheFace
15.04.05, 11:02
Hallo,
habe für eine Abteilung obiges szenario auf der Basis von openldap und samba (3.0.11) anhand des howtos von idealx.org (http://www.idealx.org/prj/samba/smbldap-howto.en.html) realisiert.
Ldap an sich scheint zu funktionen kann mit phpldapadmin den tree browsen etc, alles kein Problem. Auch ein einloggen auf dem server per ssh funktioniert tadellos.
Allerdings können sich die Clients noch nicht anmelden.
Linux-Clients (Suse):
Hier erhalte ich nach dem einloggen immer die Meldung, dass schreibrechte auf $HOME ("/") fehlen. Hier scheint also irgendwie die Information woher die homes kommen und wohin sie gemountet werden sollen zu fehlen. Benötige ich dafür einen automounter oder dergleichen?
Windows-Clients (XP):
Hier wird die Domäne einfach nicht gefunden. Über \\Rechnername kann ich mich einwandfrei am Samba anmelden (das Zusammenspiel zwischen Samba und LDAP scheint also im Prinzip auch zu funktionieren). Habe dann einen Eintrag in die lmhosts-Datei des XP-Clients gemacht ("xxx.xxx.xxx.xxx rechnername #PRE #DOM:DomainName) hat aber leider auch nichts gebracht, die Domäne will einfach nicht gefunden werden. (Maschinenaccount wurde angelegt!)
Ich denke, das sind alles nur noch kleinere Problemchen und hoffe ihr könnt mir helfen. Da ich bis nächste Woche keinen Zugriff mehr auf den Server habe, poste ich hier jetzt einfach mal die config-files aus dem Howto, die lediglich in Namensgebungen angepasst wurden:
smb.conf
# Global parameters
[global]
workgroup = IDEALX-NT
netbios name = PDC-SRV
enable privileges = yes
interfaces = 192.168.5.11
username map = /etc/samba/smbusers
server string = Samba Server %v
security = user
encrypt passwords = Yes
min passwd length = 3
obey pam restrictions = No
#unix password sync = Yes
#passwd program = /usr/local/sbin/smbldap-passwd -u %u
#passwd chat = "Changing password for*\nNew password*" %n\n "*Retype new password*" %n\n"
ldap passwd sync = Yes
log level = 0
syslog = 0
log file = /var/log/samba/log.%m
max log size = 100000
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
mangling method = hash2
Dos charset = 850
Unix charset = ISO8859-1
logon script = logon.bat
logon drive = H:
logon home =
logon path =
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes
passdb backend = ldapsam:ldap://127.0.0.1/
# passdb backend = ldapsam:"ldap://127.0.0.1/ ldap://slave.idealx.com"
# ldap filter = (&(objectclass=sambaSamAccount)(uid=%u))
ldap admin dn = cn=samba,ou=Users,dc=idealx,dc=org
ldap suffix = dc=idealx,dc=org
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Computers
ldap idmap suffix = ou=Users
ldap ssl = start tls
add user script = /usr/local/sbin/smbldap-useradd -m "%u"
ldap delete dn = Yes
#delete user script = /usr/local/sbin/smbldap-userdel "%u"
add machine script = /usr/local/sbin/smbldap-useradd -w "%u"
add group script = /usr/local/sbin/smbldap-groupadd -p "%g"
#delete group script = /usr/local/sbin/smbldap-groupdel "%g"
add user to group script = /usr/local/sbin/smbldap-groupmod -m "%u" "%g"
delete user from group script = /usr/local/sbin/smbldap-groupmod -x "%u" "%g"
set primary group script = /usr/local/sbin/smbldap-usermod -g "%g" "%u"
# printers configuration
printer admin = @"Print Operators"
load printers = Yes
create mask = 0640
directory mask = 0750
nt acl support = No
printing = cups
printcap name = cups
deadtime = 10
guest account = nobody
map to guest = Bad User
dont descend = /proc,/dev,/etc,/lib,/lost+found,/initrd
show add printer wizard = yes
; to maintain capital letters in shortcuts in any of the profile folders:
preserve case = yes
short preserve case = yes
case sensitive = no
[homes]
comment = repertoire de %U, %u
read only = No
create mask = 0644
directory mask = 0775
browseable = No
writeable = yes
[netlogon]
path = /home/netlogon/
browseable = No
read only = yes
[profiles]
path = /home/profiles
read only = no
create mask = 0600
directory mask = 0700
browseable = No
guest ok = Yes
profile acls = yes
csc policy = disable
# next line is a great way to secure the profiles
force user = %U
# next line allows administrator to access all profiles
valid users = %U @"Domain Admins"
[printers]
comment = Network Printers
printer admin = @"Print Operators"
guest ok = yes
printable = yes
path = /home/spool/
browseable = No
read only = Yes
printable = Yes
print command = /usr/bin/lpr -P%p -r %s
lpq command = /usr/bin/lpq -P%p
lprm command = /usr/bin/lprm -P%p %j
[print$]
path = /home/printers
guest ok = No
browseable = Yes
read only = Yes
valid users = @"Print Operators"
write list = @"Print Operators"
create mask = 0664
directory mask = 0775
[public]
comment = Repertoire public
path = /home/public
browseable = Yes
guest ok = Yes
read only = No
directory mask = 0775
create mask = 0664
slapd.conf
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba.schema
schemacheck on
lastmod on
TLSCertificateFile /etc/openldap/ldap.idealx.com.pem
TLSCertificateKeyFile /etc/openldap/ldap.idealx.com.key
TLSCACertificateFile /etc/openldap/ca.pem
TLSCipherSuite :SSLv3
#TLSVerifyClient demand
################################################## #####################
# bdb database definitions
################################################## #####################
database bdb
suffix dc=idealx,dc=org
rootdn "cn=Manager,dc=idealx,dc=org"
rootpw secret
directory /var/lib/ldap
index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,mail,givenname eq,subinitial
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
# users can authenticate and change their password
access to attrs=userPassword,sambaNTPassword,sambaLMPassword
by self write
by anonymous auth
by * none
# all others attributes are readable to everybody
access to *
by * read
Gruß und danke,
Ace
habe für eine Abteilung obiges szenario auf der Basis von openldap und samba (3.0.11) anhand des howtos von idealx.org (http://www.idealx.org/prj/samba/smbldap-howto.en.html) realisiert.
Ldap an sich scheint zu funktionen kann mit phpldapadmin den tree browsen etc, alles kein Problem. Auch ein einloggen auf dem server per ssh funktioniert tadellos.
Allerdings können sich die Clients noch nicht anmelden.
Linux-Clients (Suse):
Hier erhalte ich nach dem einloggen immer die Meldung, dass schreibrechte auf $HOME ("/") fehlen. Hier scheint also irgendwie die Information woher die homes kommen und wohin sie gemountet werden sollen zu fehlen. Benötige ich dafür einen automounter oder dergleichen?
Windows-Clients (XP):
Hier wird die Domäne einfach nicht gefunden. Über \\Rechnername kann ich mich einwandfrei am Samba anmelden (das Zusammenspiel zwischen Samba und LDAP scheint also im Prinzip auch zu funktionieren). Habe dann einen Eintrag in die lmhosts-Datei des XP-Clients gemacht ("xxx.xxx.xxx.xxx rechnername #PRE #DOM:DomainName) hat aber leider auch nichts gebracht, die Domäne will einfach nicht gefunden werden. (Maschinenaccount wurde angelegt!)
Ich denke, das sind alles nur noch kleinere Problemchen und hoffe ihr könnt mir helfen. Da ich bis nächste Woche keinen Zugriff mehr auf den Server habe, poste ich hier jetzt einfach mal die config-files aus dem Howto, die lediglich in Namensgebungen angepasst wurden:
smb.conf
# Global parameters
[global]
workgroup = IDEALX-NT
netbios name = PDC-SRV
enable privileges = yes
interfaces = 192.168.5.11
username map = /etc/samba/smbusers
server string = Samba Server %v
security = user
encrypt passwords = Yes
min passwd length = 3
obey pam restrictions = No
#unix password sync = Yes
#passwd program = /usr/local/sbin/smbldap-passwd -u %u
#passwd chat = "Changing password for*\nNew password*" %n\n "*Retype new password*" %n\n"
ldap passwd sync = Yes
log level = 0
syslog = 0
log file = /var/log/samba/log.%m
max log size = 100000
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
mangling method = hash2
Dos charset = 850
Unix charset = ISO8859-1
logon script = logon.bat
logon drive = H:
logon home =
logon path =
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes
passdb backend = ldapsam:ldap://127.0.0.1/
# passdb backend = ldapsam:"ldap://127.0.0.1/ ldap://slave.idealx.com"
# ldap filter = (&(objectclass=sambaSamAccount)(uid=%u))
ldap admin dn = cn=samba,ou=Users,dc=idealx,dc=org
ldap suffix = dc=idealx,dc=org
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Computers
ldap idmap suffix = ou=Users
ldap ssl = start tls
add user script = /usr/local/sbin/smbldap-useradd -m "%u"
ldap delete dn = Yes
#delete user script = /usr/local/sbin/smbldap-userdel "%u"
add machine script = /usr/local/sbin/smbldap-useradd -w "%u"
add group script = /usr/local/sbin/smbldap-groupadd -p "%g"
#delete group script = /usr/local/sbin/smbldap-groupdel "%g"
add user to group script = /usr/local/sbin/smbldap-groupmod -m "%u" "%g"
delete user from group script = /usr/local/sbin/smbldap-groupmod -x "%u" "%g"
set primary group script = /usr/local/sbin/smbldap-usermod -g "%g" "%u"
# printers configuration
printer admin = @"Print Operators"
load printers = Yes
create mask = 0640
directory mask = 0750
nt acl support = No
printing = cups
printcap name = cups
deadtime = 10
guest account = nobody
map to guest = Bad User
dont descend = /proc,/dev,/etc,/lib,/lost+found,/initrd
show add printer wizard = yes
; to maintain capital letters in shortcuts in any of the profile folders:
preserve case = yes
short preserve case = yes
case sensitive = no
[homes]
comment = repertoire de %U, %u
read only = No
create mask = 0644
directory mask = 0775
browseable = No
writeable = yes
[netlogon]
path = /home/netlogon/
browseable = No
read only = yes
[profiles]
path = /home/profiles
read only = no
create mask = 0600
directory mask = 0700
browseable = No
guest ok = Yes
profile acls = yes
csc policy = disable
# next line is a great way to secure the profiles
force user = %U
# next line allows administrator to access all profiles
valid users = %U @"Domain Admins"
[printers]
comment = Network Printers
printer admin = @"Print Operators"
guest ok = yes
printable = yes
path = /home/spool/
browseable = No
read only = Yes
printable = Yes
print command = /usr/bin/lpr -P%p -r %s
lpq command = /usr/bin/lpq -P%p
lprm command = /usr/bin/lprm -P%p %j
[print$]
path = /home/printers
guest ok = No
browseable = Yes
read only = Yes
valid users = @"Print Operators"
write list = @"Print Operators"
create mask = 0664
directory mask = 0775
[public]
comment = Repertoire public
path = /home/public
browseable = Yes
guest ok = Yes
read only = No
directory mask = 0775
create mask = 0664
slapd.conf
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba.schema
schemacheck on
lastmod on
TLSCertificateFile /etc/openldap/ldap.idealx.com.pem
TLSCertificateKeyFile /etc/openldap/ldap.idealx.com.key
TLSCACertificateFile /etc/openldap/ca.pem
TLSCipherSuite :SSLv3
#TLSVerifyClient demand
################################################## #####################
# bdb database definitions
################################################## #####################
database bdb
suffix dc=idealx,dc=org
rootdn "cn=Manager,dc=idealx,dc=org"
rootpw secret
directory /var/lib/ldap
index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,mail,givenname eq,subinitial
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
# users can authenticate and change their password
access to attrs=userPassword,sambaNTPassword,sambaLMPassword
by self write
by anonymous auth
by * none
# all others attributes are readable to everybody
access to *
by * read
Gruß und danke,
Ace