Newsgroup: it.comp.os.linux.sys
Titolo: [DISPERAZIONE] samba 3 + ldap + pdc + sarge

Ho configurato un server samba per "fungere" da pdc. pero' non riesco ad 
aggiungere i pc al dominio. Gli errori che trovo nei log sono:
[2005/04/07 17:09:04, 1] auth/auth_util.c:make_server_info_sam(822)
  User administrator in passdb, but getpwnam() fails!
[2005/04/07 17:09:04, 0] auth/auth_sam.c:check_sam_security(306)
  check_sam_security: make_server_info_sam() failed with 
'NT_STATUS_NO_SUCH_USER'
ho creato i gruppi di windows con il comando:
 
smbldap-groupadd.pl
 -a -g 200 "Domain Admins"
e ho aggiunto l'administrator:
smbldap-useradd.pl
 -a -m -g 200 administrator (qui mi da errore con unknown 
group 200 ho girato l'errore modificando il $_defaultUserGid = 200 in 
smbldap_config.pm
)
smbldap-usermod.pl
 -u 0 administrator
e gli ho impostato la password con: 
smbldap-passwd.pl
 administrator
ma niente... quando cerco di aggiungere la macchina al dominio su windows mi 
risponde: "Errore durante l'acceso: nome utente sconosciuto o password non 
valida" mentre linux mi risponde come sopra!
Ringrazio tantissimo coloro che vorranno darmi una mano!!!
Ciao
Dade
uso debian sarge. Riporto la configurazione:
/etc/samba/smb.conf
 #======================= Global Settings =======================
[global]
workgroup = company
server string = %h server (Samba %v)
interfaces = 
192.168.50.3/24
 
127.0.0.1/24
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
#encrypt passwords = true
passdb backend = ldapsam:ldap://
127.0.0.1
obey pam restrictions = no
#invalid users = root
unix password sync = yes
passwd program = /usr/local/sbin/
smbldap-passwd.pl
 -o %u
#passwd program = /usr/bin/passwd %u
passwd chat = *new*password* %n\n *new*password* %n\n *successfully*
#passwd chat = *Enter\snew\sUNIX\spassword:* %n\n 
*Retype\snew\sUNIX\spassword:* %n\n
hide dot files = yes
default case = Lower
veto files = /.*/
#domain admin group = root admin
writelist = administrator
#encrypt passwords = true
#obey pam restrictions = yes
admin users = root
use sendfile = no
########## PRINTING ##########
printing = cups
printcap name = CUPS
printcap = cups
load printers = yes
############ LDAP ############
ldap suffix = dc=company,dc=it
ldap admin dn = cn=admin,dc=company,dc=it
ldap ssl = no
ldap user suffix = ou=People
ldap group suffix = ou=Group
############ PDC #############
add machine script = /usr/local/sbin/
smbldap-useradd.pl
 -w -d /dev/null -s 
/bin/false %u
add user script = /usr/local/sbin/
smbldap-useradd.pl
 -a -d /dev/null -g 
5000 -s /bin/false
os level = 33
preferred master = yes
domain master = yes
local master = yes
domain logons = yes
logon path = \\%N\profiles
logon drive = H:
logon home = \\%N\%u
socket options = TCP_NODELAY
#======================= Share Definitions =======================
[homes]
comment = Home Directories
browseable = no
writable = no
create mask = 0700
[prova]
path = /dati/
read only = no
create mask = 0600
directory mask = 0700
[profiles]
path = /var/lib/samba/profiles
read only = no
create mask = 0600
directory mask = 0700
[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
/etc/nsswitch.conf:
passwd:         compat ldap
group:          compat ldap
shadow:         compat ldap
hosts:          files dns
networks:       files
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis
/etc/pam.d/samba:
@include common-auth
@include common-account
@include common-session
auth            sufficient      pam_ldap.so
auth            required        pam_unix.so nullok
account         sufficient      pam_ldap.so
account         required        pam_unix.so
session         sufficient      pam_ldap.so
session         required        pam_unix.so
password        sufficient      pam_ldap.so
/etc/ldap/ldap.conf
#HOST 127.0.0.1
#BASE dc=company,dc=it
SIZELIMIT 200
TIMELIMIT 15
DEREF never
host 127.0.0.1
base dc=company,dc=it
binddn cn=admin,dc=company,dc=it
bindpw 'XXX'
pam_password exop
nss_base_passwd dc=company,dc=it?sub
nss_base_shadow dc=company,dc=it?sub
nss_base_group ou=Group,dc=company,dc=it?one
/etc/ldap/slapd.conf:
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.
#######################################################################
# Global Directives:
# Features to permit
#allow bind_v2
# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/samba.schema
# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck     on
# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid
# List of arguments that were passed to the server
argsfile        /var/run/slapd.args
# Read slapd.conf(5) for possible values
loglevel        0
# Where the dynamically loaded modules are stored
modulepath      /usr/lib/ldap
moduleload      back_bdb
#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend         bdb
#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend                <other>
#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        bdb
# The base of your directory in database #1
suffix          "dc=company,dc=it"
# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"
# Indexing options for database #1
#index           objectClass eq
index           objectClass,uid,uidNumber,gidNumber,memberUid eq
index           cn,mail,surname,givenName eq,subinitial
# Save the time that the entry gets modified, for database #1
lastmod         on
# Where to store the replica logs for database #1
# replogfile    /var/lib/ldap/replog
# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
access to attribute=userPassword
        by dn="cn=admin,dc=company,dc=it" write
        by anonymous auth
        by self write
        by * none
# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work
# happily.
access to dn.base="" by * read
# The admin dn has full write access, everyone else
# can read everything.
access to *
        by dn="cn=admin,dc=company,dc=it" write
        by * read
# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
access to dn=".*,ou=Roaming,o=morsnet"
        by dn="cn=admin,dc=company,dc=it" write
        by dnattr=owner write
#######################################################################
# Specific Directives for database #2, of type 'other' (can be bdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database        <other>
# The base of your directory for database #2
#suffix         "dc=debian,dc=org"
rootdn "cn=admin,ou=People,dc=company,dc=it"
rootpw "XXX"
LDIF:
dn: dc=company,dc=it,sn=vitali
objectClass: dcObject
objectClass: inetOrgPerson
dc: vitalicucine
dn: cn=admin,dc=company,dc=it
objectClass: organizationalRole
objectClass: simpleSecurityObject
cn: admin
dn: ou=Group,dc=company,dc=it
objectClass: top
objectClass: organizationalUnit
ou: Group
dn: ou=People,dc=company,dc=it
objectClass: top
objectClass: organizationalUnit
ou: People
dn: ou=Hosts,dc=company,dc=it
objectClass: top
objectClass: organizationalUnit
ou: Hosts

 admin users = root
beh si parlava di uid 0, qui ci va administrator se lo usi

 beh si parlava di uid 0, qui ci va administrator se lo usi
hai ragione :-) corretto... ma ancora non va nulla :/
ciao e grazie dei tuoi suggerimenti!
Dade 

 Unknown database: administrator
ehm era un "getent su administrator che ti da`?" interroga
i database, il comando e` getent passwd administrator