Eu tenho um servidor ldap aberto:
IP: 192.168.0.70 (dell)
DIT:
(vistoatravésdeldapphpadmin)
Eparapatriciaduchesne:
dncn=patriciaduchesne,ou=users,dc=memorandum,dc=procnpatriciaduchesnegidnumber501givennamepatriciahomedirectory/home/users/pduchesneloginshell/bin/bashobjectclassinetOrgPerson|posixAccount|topsnduchesneuidpduchesneuidnumber1000userpassword{MD5}eFI0F0...
EntãoeutenhoumclienteLDAP:
IP:192.168.0.60(pb)
ONSSWitchestáconfigurado:
$cat/etc/nsswitch.confpasswd:filesldapgroup:filesldapshadow:filesldapgshadow:fileshosts:filesmdns4_minimal[NOTFOUND=return]dnsnetworks:filesprotocols:dbfilesservices:dbfilesethers:dbfilesrpc:dbfilesnetgroup:nis
assiméldap-auth:
$cat/etc/auth-client-config/profile.d/ldap-auth-config[lac_ldap]nss_passwd=passwd:filesldapnss_group=group:filesldapnss_shadow=shadow:filesldapnss_netgroup=netgroup:nis
elibnss:
$cat/etc/libnss-ldap.confurildap://192.168.0.70basedc=memorandum,dc=pro
Eupossoacessarasinformaçõesdousuáriodoldap:
$getentpasswd|tail-n1pduchesne:*:1000:501:patriciaduchesne:/home/users/pduchesne:/bin/bash
Masnãoconsigomeconectar:
DoIP:192.168.0.80
[email protected]@192.168.0.60'spassword:Permissiondenied,[email protected]'spassword:Permissiondenied,[email protected]'spassword:Permissiondenied(publickey,password).
Oqueestouperdendo?
Euolheicentenasdepáginassemencontrarumamaneiradeconfigurartudoisso:( link
link
link
Encontrar esta página: link
Eu percebi que não sei onde estão os logs do ldap: - (
EDITAR
A seguir: link
Configuração do PAM em 192.168.0.60:
$ cat /usr/share/pam-configs/my_mkhomedir
Name: activate mkhomedir
Default: yes
Priority: 900
Session-Type: Additional
Session:
required pam_mkhomedir.so umask=0022 skel=/etc/skel
Atualização:
$ sudo pam-auth-update
[sudo] password for romain:
LDAP Password:
Oarquivo
$cat/etc/security/group.conf
étotalmentecomentado
Eunãouseionscd:
$/etc/init.d/nscdstop[....]Stoppingnscd(viasystemctl):nscd.service====AUTHENTICATINGFORorg.freedesktop.systemd1.manage-units===Authenticationisrequiredtostop'nscd.service'.Authenticatingas:romain,,,(romain)Password:LDAPPassword:====AUTHENTICATIONCOMPLETE===.ok
Eunãouseioparágrafo[AutorizaçãodeacessoaohostLDAP].Eudevo?
EDIT2
Verbosessh:
romain@Mac:~$ssh-vpduchesne@pbOpenSSH_6.9p1,LibreSSL2.1.8debug1:Readingconfigurationdata/etc/ssh/ssh_configdebug1:/etc/ssh/ssh_configline20:Applyingoptionsfor*debug1:/etc/ssh/ssh_configline102:Applyingoptionsfor*debug1:Connectingtopb[192.168.0.60]port22.debug1:Connectionestablished.debug1:identityfile/Users/romain/.ssh/id_rsatype1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_rsa-certtype-1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_dsatype-1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_dsa-certtype-1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_ecdsatype-1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_ecdsa-certtype-1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_ed25519type-1debug1:key_load_public:Nosuchfileordirectorydebug1:identityfile/Users/romain/.ssh/id_ed25519-certtype-1debug1:Enablingcompatibilitymodeforprotocol2.0debug1:LocalversionstringSSH-2.0-OpenSSH_6.9debug1:Remoteprotocolversion2.0,remotesoftwareversionOpenSSH_7.2p2Ubuntu-4ubuntu2.1debug1:match:OpenSSH_7.2p2Ubuntu-4ubuntu2.1patOpenSSH*compat0x04000000debug1:Authenticatingtopb:22as'pduchesne'debug1:SSH2_MSG_KEXINITsentdebug1:SSH2_MSG_KEXINITreceiveddebug1:kex:server->[email protected]<implicit>nonedebug1:kex:client->[email protected]<implicit>nonedebug1:expectingSSH2_MSG_KEX_ECDH_REPLYdebug1:Serverhostkey:ecdsa-sha2-nistp256SHA256:OIiYKNK9FOdhlu2sVahXFoXYCjxmxTQ7NrZtA75Vwpsdebug1:Host'pb'isknownandmatchestheECDSAhostkey.debug1:Foundkeyin/Users/romain/.ssh/known_hosts:18debug1:SSH2_MSG_NEWKEYSsentdebug1:expectingSSH2_MSG_NEWKEYSdebug1:SSH2_MSG_NEWKEYSreceiveddebug1:SSH2_MSG_SERVICE_REQUESTsentdebug1:SSH2_MSG_SERVICE_ACCEPTreceiveddebug1:Authenticationsthatcancontinue:publickey,passworddebug1:Nextauthenticationmethod:publickeydebug1:OfferingRSApublickey:/Users/romain/.ssh/id_rsadebug1:Authenticationsthatcancontinue:publickey,passworddebug1:Tryingprivatekey:/Users/romain/.ssh/id_dsadebug1:Tryingprivatekey:/Users/romain/.ssh/id_ecdsadebug1:Tryingprivatekey:/Users/romain/.ssh/id_ed25519debug1:Nextauthenticationmethod:passwordpduchesne@pb'spassword:debug1:Authenticationsthatcancontinue:publickey,passwordPermissiondenied,pleasetryagain.pduchesne@pb'spassword:debug1:Authenticationsthatcancontinue:publickey,passwordPermissiondenied,pleasetryagain.pduchesne@pb'spassword:debug1:Authenticationsthatcancontinue:publickey,passworddebug1:Nomoreauthenticationmethodstotry.Permissiondenied(publickey,password).
EDIT3
Adicionandoohashpwddousuárionoservidorldap(consulteodumpdousuárionoinício)
EDIT4
Seguindoaproposta@grawity,instaleialibpam-ldapd:
romain@pb$sudoapt-getinstalllibpam-ldapd[sudo]passwordforromain:LDAPPassword:Thefollowingpackageswereautomaticallyinstalledandarenolongerrequired:auth-client-configldap-auth-configUse'sudoaptautoremove'toremovethem.ThefollowingpackageswillbeREMOVED:libpam-ldapThefollowingNEWpackageswillbeinstalled:libpam-ldapdDoyouwanttocontinue?[Y/n]Y(...)Settinguplibpam-ldapd:amd64(0.9.6-3)...
Entãoeuconfigureio/etc/nslcd.conf
noqualeunoteiquenãoestavaespecificandooprecingparausaroldapversion3(eunãoseiqualversãoéporpadrão?):
romain@pb$sudocat/etc/nslcd.conf|grep"^[^#]"
uid nslcd
gid nslcd
uri ldap://192.168.0.70
base dc=memorandum,dc=pro
ldap_version 3
tls_cacertfile /etc/ssl/certs/ca-certificates.crt
Reinicializado nslcd:
romain@pb$ sudo service nslcd restart
e tentou se conectar do meu mac:
romain@Mac:~$ ssh pduchesne@pb
que funcionou ... mais ou menos:
romain@Mac:~$ ssh pduchesne@pb
pduchesne@pb's password:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-53-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
197 packages can be updated.
4 updates are security updates.
*** System restart required ***
Last login: Fri Jan 13 11:12:23 2017 from 192.168.0.80
romain@pb:~$ pwd
/home/users/pduchesne
romain@pb:~$ whoami
romain
Nova pergunta (para edição 4)
Por que não mudo de usuário?
Eu estava esperando para entrar em 'pb' como 'pduchesne': - /
Old Question (antes do Edit 4)
Eu não sei quais arquivos verificar - qualquer recomendação é bem-vinda.