Havoc][
Debian && Gentoo'ler
Hallo zusammen,
irgendwie funktioniert mein tolles OpenLDAP & Samba zusammenspiel nicht richtig.
LDAP und Samba laufen und ich habe bereits einen Testuser angelegt, aber dieser kann sich nicht mit dem Samba verbinden:
(Client)
In den LOGS des Sambas taucht leider nichts auf:
Dienste laufen:
In der Samba Conf sollte auch alles stimmen:
Allerdings muss ich dazu sagen, dass es die Profilepfade und Shares noch nicht gibt - Aber ich denke das ist ein anderes Thema und sollte nicht zu meiner Fehlermeldung führen, oder?
ldapsearch geht:
Neben dem fehlerhaften Login funktioniert auch folgendes nicht:
und
Meine smbldap.conf sieht so aus:
Ich weiß nicht, welche Informationen noch relevant wären. Habe mir auch die wichtigsten Howtos angesehen und schon stunden lang gegoogelt. Leider konnte ich keine Anwort auf meine Fehlermeldungen finden. Ich hoffe ihr könnt mir helfen.
Vielen dank im Voraus.
Bye Havoc][
irgendwie funktioniert mein tolles OpenLDAP & Samba zusammenspiel nicht richtig.
LDAP und Samba laufen und ich habe bereits einen Testuser angelegt, aber dieser kann sich nicht mit dem Samba verbinden:
(Client)
Code:
[17:37:00] jens@odyssey:~ > smbclient -U testuser //192.168.1.107/
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
[17:37:10] jens@odyssey:~ > ssh testuser@192.168.1.107
testuser@192.168.1.107's password:
Permission denied, please try again.
testuser@192.168.1.107's password:
Permission denied, please try again.
testuser@192.168.1.107's password:
Permission denied (publickey,password).
[17:37:36] jens@odyssey:~ >
In den LOGS des Sambas taucht leider nichts auf:
Code:
root@saphira ~# tail -15 /var/log/samba/log.192.168.1.119
Unable to open printcap file /etc/printcap for read!
[2007/05/08 02:56:25, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 03:10:25, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 03:10:25, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 03:38:11, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 03:38:11, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 03:38:39, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 03:38:39, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
root@saphira ~# tail -15 /var/log/samba/log.odyssey
Connection to LDAP server failed for the 8 try!
[2007/05/08 03:10:34, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 9 try!
[2007/05/08 03:10:35, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 10 try!
[2007/05/08 03:10:36, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 11 try!
[2007/05/08 03:10:38, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 12 try!
[2007/05/08 03:10:39, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 13 try!
[2007/05/08 03:10:40, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 14 try!
[2007/05/08 03:10:41, 1] lib/smbldap.c:another_ldap_try(1150)
Connection to LDAP server failed for the 15 try!
root@saphira ~# tail -15 /var/log/samba/log.smbd
Unable to open printcap file /etc/printcap for read!
[2007/05/08 14:22:59, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 14:25:04, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 14:25:04, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 14:57:40, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 14:57:40, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 19:25:45, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
[2007/05/08 19:25:45, 0] printing/pcap.c:pcap_cache_reload(159)
Unable to open printcap file /etc/printcap for read!
root@saphira ~# tail -15 /var/log/samba/log.nmbd
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 18:08:29, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 18:20:29, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 18:32:29, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 18:44:49, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 18:56:48, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 19:08:49, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
[2007/05/08 19:20:49, 0] nmbd/nmbd_packets.c:process_browse_packet(1061)
process_browse_packet: Discarding datagram from IP 192.168.1.2. Source name SAPHIRA<00> is one of our names !
root@saphira ~#
Dienste laufen:
Code:
root@saphira ~# psg ldap
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
openldap 3776 0.0 1.6 56476 4236 ? Ssl 14:48 0:00 /usr/sbin/slapd -g openldap -u openldap
root@saphira ~# psg smbd
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 3185 0.0 1.3 14172 3364 ? Ss 14:22 0:00 /usr/sbin/smbd -D
root 3190 0.0 0.4 14172 1204 ? S 14:22 0:00 /usr/sbin/smbd -D
root@saphira ~# psg nmbd
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 3183 0.0 0.6 8220 1552 ? Ss 14:22 0:00 /usr/sbin/nmbd -D
root@saphira ~#
In der Samba Conf sollte auch alles stimmen:
Code:
root@saphira ~# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_DOMAIN_PDC
Press enter to see a dump of your service definitions
[global]
dos charset = 850
unix charset = ISO-8859-15
display charset = ISO-8859-15
workgroup = CENTURI_NETWORK
server string = JJags Fileserver im Centuri Network
interfaces = 192.168.1.0/24, eth0
bind interfaces only = Yes
passdb backend = ldapsam_compat:ldap://localhost:389/
syslog = 0
log file = /var/log/samba/log.%m
max log size = 3000
time server = Yes
add user script = /usr/local/sbin/smbldap-useradd.pl -m '%u'
delete user script = /usr/local/sbin/smbldap-userdel.pl %u
add group script = /usr/local/sbin/smbldap-groupadd.pl -p '%g'
delete group script = /usr/local/sbin/smbldap-groupdel.pl '%g'
add user to group script = /usr/local/sbin/smbldap-groupmod.pl -m '%g' '%u'
delete user from group script = /usr/local/sbin/smbldap-groupmod.pl -x '%g' '%u'
set primary group script = /usr/local/sbin/smbldap-usermod.pl -g '%g' '%u'
add machine script = /usr/local/sbin/smbldap-useradd.pl -w '%u'
logon script = logon.cmd
logon path = \\%N\profiles\%U
logon drive = H:
domain logons = Yes
os level = 64
preferred master = Yes
domain master = Yes
dns proxy = No
wins support = Yes
ldap admin dn = cn=manager,dc=centuri,dc=lan
ldap delete dn = Yes
ldap group suffix = ou=Group
ldap machine suffix = ou=Machine
ldap suffix = dc=centuri,dc=lan
ldap ssl = no
ldap user suffix = ou=User
panic action = /usr/share/samba/panic-action %d
admin users = root, Administrator
profile acls = Yes
hide unreadable = Yes
[homes]
comment = Home Directories
valid users = %S
create mask = 0700
directory mask = 0700
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
root@saphira ~#
Allerdings muss ich dazu sagen, dass es die Profilepfade und Shares noch nicht gibt - Aber ich denke das ist ein anderes Thema und sollte nicht zu meiner Fehlermeldung führen, oder?
ldapsearch geht:
Code:
root@saphira ~# ldapsearch -x
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# centuri.lan
dn: dc=centuri,dc=lan
objectClass: dcObject
objectClass: organization
o: centuri
dc: centuri
# Users, centuri.lan
dn: ou=Users,dc=centuri,dc=lan
objectClass: top
objectClass: organizationalUnit
ou: Users
# Groups, centuri.lan
dn: ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: organizationalUnit
ou: Groups
# Machine, centuri.lan
dn: ou=Machine,dc=centuri,dc=lan
objectClass: top
objectClass: organizationalUnit
ou: Machine
# Idmap, centuri.lan
dn: ou=Idmap,dc=centuri,dc=lan
objectClass: top
objectClass: organizationalUnit
ou: Idmap
# root, Users, centuri.lan
dn: uid=root,ou=Users,dc=centuri,dc=lan
cn: root
sn: root
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
objectClass: shadowAccount
gidNumber: 0
uid: root
uidNumber: 0
homeDirectory: /home/root
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaHomeDrive: H:
sambaPrimaryGroupSID: S-1-5-21-2085302994-876156880-2052723712-512
sambaSID: S-1-5-21-2085302994-876156880-2052723712-500
loginShell: /bin/false
gecos: Netbios Domain Administrator
sambaLMPassword: BLA
sambaAcctFlags: [U]
sambaNTPassword: BLA
sambaPwdLastSet: 1178628527
sambaPwdMustChange: 1182516527
# nobody, Users, centuri.lan
dn: uid=nobody,ou=Users,dc=centuri,dc=lan
cn: nobody
sn: nobody
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
objectClass: shadowAccount
gidNumber: 514
uid: nobody
uidNumber: 999
homeDirectory: /dev/null
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaPrimaryGroupSID: S-1-5-21-2085302994-876156880-2052723712-514
sambaLMPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaNTPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaAcctFlags: [NUD ]
sambaSID: S-1-5-21-2085302994-876156880-2052723712-2998
loginShell: /bin/false
# Domain Admins, Groups, centuri.lan
dn: cn=Domain Admins,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 512
cn: Domain Admins
memberUid: root
description: Netbios Domain Administrators
sambaSID: S-1-5-21-2085302994-876156880-2052723712-512
sambaGroupType: 2
displayName: Domain Admins
# Domain Users, Groups, centuri.lan
dn: cn=Domain Users,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 513
cn: Domain Users
description: Netbios Domain Users
sambaSID: S-1-5-21-2085302994-876156880-2052723712-513
sambaGroupType: 2
displayName: Domain Users
# Domain Guests, Groups, centuri.lan
dn: cn=Domain Guests,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 514
cn: Domain Guests
description: Netbios Domain Guests Users
sambaSID: S-1-5-21-2085302994-876156880-2052723712-514
sambaGroupType: 2
displayName: Domain Guests
# Domain Computers, Groups, centuri.lan
dn: cn=Domain Computers,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 515
cn: Domain Computers
description: Netbios Domain Computers accounts
sambaSID: S-1-5-21-2085302994-876156880-2052723712-515
sambaGroupType: 2
displayName: Domain Computers
# Administrators, Groups, centuri.lan
dn: cn=Administrators,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 544
cn: Administrators
description: Netbios Domain Members can fully administer the computer/sambaDom
ainName
sambaSID: S-1-5-32-544
sambaGroupType: 5
displayName: Administrators
# Account Operators, Groups, centuri.lan
dn: cn=Account Operators,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 548
cn: Account Operators
description: Netbios Domain Users to manipulate users accounts
sambaSID: S-1-5-32-548
sambaGroupType: 5
displayName: Account Operators
# Print Operators, Groups, centuri.lan
dn: cn=Print Operators,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 550
cn: Print Operators
description: Netbios Domain Print Operators
sambaSID: S-1-5-32-550
sambaGroupType: 5
displayName: Print Operators
# Backup Operators, Groups, centuri.lan
dn: cn=Backup Operators,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 551
cn: Backup Operators
description: Netbios Domain Members can bypass file security to back up files
sambaSID: S-1-5-32-551
sambaGroupType: 5
displayName: Backup Operators
# Replicators, Groups, centuri.lan
dn: cn=Replicators,ou=Groups,dc=centuri,dc=lan
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 552
cn: Replicators
description: Netbios Domain Supports file replication in a sambaDomainName
sambaSID: S-1-5-32-552
sambaGroupType: 5
displayName: Replicators
# CENTURI_NETWORK, centuri.lan
dn: sambaDomainName=CENTURI_NETWORK,dc=centuri,dc=lan
gidNumber: 1500
objectClass: top
objectClass: sambaDomain
objectClass: sambaUnixIdPool
sambaSID: S-1-5-21-2085302994-876156880-2052723712
sambaDomainName: CENTURI_NETWORK
uidNumber: 1551
# testuser, Users, centuri.lan
dn: uid=testuser,ou=Users,dc=centuri,dc=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: testuser
sn: testuser
givenName: testuser
uid: testuser
uidNumber: 1550
gidNumber: 513
homeDirectory: /home/testuser
loginShell: /bin/bash
gecos: System User
# search result
search: 2
result: 0 Success
# numResponses: 19
# numEntries: 18
root@saphira ~#
Neben dem fehlerhaften Login funktioniert auch folgendes nicht:
Code:
root@saphira ~# net groupmap list
[2007/05/08 19:33:23, 0] passdb/pdb_ldap.c:ldapsam_setsamgrent(3051)
ldapsam_setsamgrent: LDAP search failed: No such object
[2007/05/08 19:33:23, 0] passdb/pdb_ldap.c:ldapsam_enum_group_mapping(3123)
ldapsam_enum_group_mapping: Unable to open passdb
root@saphira ~#
und
Code:
root@saphira ~# pdbedit -Lv
root@saphira ~# pdbedit -Lv root
Username not found!
root@saphira ~# pdbedit -Lv testuser
Username not found!
root@saphira ~#
Meine smbldap.conf sieht so aus:
Code:
root@saphira ~# grep -v "#" /etc/smbldap-tools/smbldap.conf
SID="S-1-5-21-2085302994-876156880-2052723712"
sambaDomain="CENTURI_NETWORK"
slaveLDAP="127.0.0.1"
slavePort="389"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
verify="require"
cafile="/etc/opt/IDEALX/smbldap-tools/ca.pem"
clientcert="/etc/opt/IDEALX/smbldap-tools/smbldap-tools.pem"
clientkey="/etc/opt/IDEALX/smbldap-tools/smbldap-tools.key"
suffix="dc=centuri,dc=lan"
usersdn="ou=Users,${suffix}"
computersdn="ou=Machine,${suffix}"
groupsdn="ou=Groups,${suffix}"
idmapdn="ou=Idmap,${suffix}"
sambaUnixIdPooldn="sambaDomainName=CENTURI_NETWORK,${suffix}"
scope="sub"
hash_encrypt="SSHA"
crypt_salt_format="%s"
userLoginShell="/bin/bash"
userHome="/home/%U"
userHomeDirectoryMode="700"
userGecos="System User"
defaultUserGid="513"
defaultComputerGid="515"
skeletonDir="/etc/skel"
defaultMaxPasswordAge="45"
userSmbHome=""
userProfile=""
userHomeDrive="H:"
userScript="logon.bat"
mailDomain="centuri.lan"
with_smbpasswd="0"
smbpasswd="/usr/bin/smbpasswd"
with_slappasswd="0"
slappasswd="/usr/sbin/slappasswd"
root@saphira ~#
Ich weiß nicht, welche Informationen noch relevant wären. Habe mir auch die wichtigsten Howtos angesehen und schon stunden lang gegoogelt. Leider konnte ich keine Anwort auf meine Fehlermeldungen finden. Ich hoffe ihr könnt mir helfen.
Vielen dank im Voraus.
Bye Havoc][