[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chiarimenti su common-auth



scusate, credo di aver sbagliato.

ho rifatto il test con nslcd -d e getent passwd su altra shell usando in entrambe root e questo è ciò che mi visualizza nslcd -d:

root@dello:/home/stefano# nslcd -d
nslcd: DEBUG: add_uri(ldap://192.168.5.200:389)
nslcd: version 0.7.6 starting
nslcd: DEBUG: unlink() of /var/run/nslcd/socket failed (ignored): No such file or directory
nslcd: DEBUG: setgroups(0,NULL) done
nslcd: DEBUG: setgid(127) done
nslcd: DEBUG: setuid(118) done
nslcd: accepting connections
nslcd: [8b4567] DEBUG: connection from pid=3548 uid=0 gid=0
nslcd: [8b4567] DEBUG: nslcd_passwd_all()
nslcd: [8b4567] DEBUG: myldap_search(base="dc=amahoro,dc=bi", filter="(objectClass=posixAccount)")
nslcd: [8b4567] DEBUG: ldap_initialize(ldap://192.168.5.200:389)
nslcd: [8b4567] DEBUG: ldap_set_rebind_proc()
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [8b4567] DEBUG: ldap_simple_bind_s(NULL,NULL) (uri="ldap://192.168.5.200:389";)
nslcd: [8b4567] ldap_result() failed: No such object

e non mi pare vada a buon fine. sull'altra shell getent passwd continua a non visualizzarmi gli utenti di ldap.
cosa c'è ancora da verificare?

per quanto riguarda la modifica dell'uid che vi dicevo ho risolto con modrdn.



On 03/30/2012 09:47 AM, stefano wrote:
Buongiorno,

ho fatto alcune prove. vi riporto l'output di nslcd -d dopo aver lanciato getent passwd da un'altra shell:

sudo nslcd -d
nslcd: DEBUG: add_uri(ldap://192.168.5.200:389)
nslcd: version 0.7.6 starting
nslcd: DEBUG: unlink() of /var/run/nslcd/socket failed (ignored): No such file or directory
nslcd: DEBUG: setgroups(0,NULL) done
nslcd: DEBUG: setgid(127) done
nslcd: DEBUG: setuid(118) done
nslcd: accepting connections
nslcd: [8b4567] DEBUG: connection from pid=2727 uid=0 gid=1000
nslcd: [8b4567] DEBUG: nslcd_pam_authz("stefano","","sudo","stefano","dello","/dev/pts/1") nslcd: [8b4567] DEBUG: myldap_search(base="dc=amahoro,dc=bi", filter="(&(objectClass=posixAccount)(uid=stefano))")
nslcd: [8b4567] DEBUG: ldap_initialize(ldap://192.168.5.200:389)
nslcd: [8b4567] DEBUG: ldap_set_rebind_proc()
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [8b4567] DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [8b4567] DEBUG: ldap_simple_bind_s(NULL,NULL) (uri="ldap://192.168.5.200:389";)
nslcd: [8b4567] ldap_result() failed: No such object
nslcd: [8b4567] "stefano": user not found
nslcd: [7b23c6] DEBUG: connection from pid=2727 uid=0 gid=0
nslcd: [7b23c6] DEBUG: nslcd_passwd_all()
nslcd: [7b23c6] DEBUG: myldap_search(base="dc=amahoro,dc=bi", filter="(objectClass=posixAccount)")
nslcd: [7b23c6] DEBUG: ldap_initialize(ldap://192.168.5.200:389)
nslcd: [7b23c6] DEBUG: ldap_set_rebind_proc()
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [7b23c6] DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [7b23c6] DEBUG: ldap_simple_bind_s(NULL,NULL) (uri="ldap://192.168.5.200:389";)
nslcd: [7b23c6] ldap_result() failed: No such object

Altra cosa strana, con ldapmodify voglio cambiare l'attributo "uid" di una entry

root@amahoro:~# ldapmodify -x -W -D 'cn=Manager,dc=amahoro,dc=bi'
Enter LDAP Password:
dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi
changetype: modify
replace: uid
uid: admin

modifying entry "uid=stefano,cn=Admins,dc=amahoro,dc=bi"
ldap_modify: Naming violation (64)
additional info: value of naming attribute 'uid' is not present in entry

e questo è il risultato. perchè? l'attributo "uid" è presente nel db e lo posso visualizzare con ldapsearch.

grazie




On 03/29/2012 05:26 PM, Giuseppe Sacco wrote:
Il giorno gio, 29/03/2012 alle 16.28 +0200, stefano ha scritto:
[...]

Nell'output di strace non mi pare che ci sia nulla di interessante. Il
messaggio frequente che hai segnalato come errore non è un errore. Il
file /etc/ld.so.nohwcap normalmente non esiste. È una cosa normale. Una
qualsiasi semplice ricerca sul web ti permetterà di capire a che serve
quel file.

Ho messo in grassetto le righe di cui vi chiedo ancora supporto.

Ho lanciato anche il debug:

stefano@dello:~$ sudo nslcd --debug
nslcd: DEBUG: add_uri(ldap://192.168.5.200:389)
nslcd: version 0.7.6 starting
nslcd: DEBUG: unlink() of /var/run/nslcd/socket failed (ignored): No
such file or directory
nslcd: DEBUG: setgroups(0,NULL) done
nslcd: DEBUG: setgid(127) done
nslcd: DEBUG: setuid(118) done
nslcd: accepting connections

Anche questa riga che ho evidenziato non va bene.
perché non va bene? A me pare tutto corretto: nslcd sta cercando di
cancellare il file «socket» prima di ricrearlo. Poiché non ce n'è uno
già esistente, allora non lo cancella.

Quindi, una volta che lo hai attivato in debug, chiama getent (in una
diversa shell) e vedi cosa ti scrive il debug.

Ciao,
G.





Reply to: