From: Eugene Prokopiev <john@rmts.donpac.ru> To: community@altlinux.ru Subject: [Comm] /etc/passwd -> ldap: как задать пароль? Date: Thu, 15 Apr 2004 14:39:45 +0400 Message-ID: <407E6671.3060309@rmts.donpac.ru> (raw) Здравствуйте! Имеем openldap, nss_ldap и pam_ldap, сконфигурированные так: # grep ^[a-z] /etc/openldap/slapd.conf include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema include /etc/openldap/schema/misc.schema include /etc/openldap/schema/nis.schema include /etc/openldap/schema/openldap.schema include /etc/openldap/schema/dhcp.schema include /etc/openldap/schema/internet-access.schema pidfile /var/run/slapd.pid argsfile /var/run/slapd.args database ldbm suffix "dc=myserver,dc=myprovider,dc=ru" rootdn "cn=manager,dc=myserver,dc=myprovider,dc=ru" rootpw secret directory /var/lib/ldap/bases loglevel -1 index objectClass,uid,uidNumber,gidNumber eq index cn,mail,surname,givenname eq,subinitial index dhcpHWAddress eq index dhcpClassData eq # grep ^[a-z] /etc/ldap.conf host 127.0.0.1 base dc=myserver,dc=myprovider,dc=ru bindpw secret rootbinddn cn=manager,dc=myserver,dc=myprovider,dc=ru # grep ^[a-z] /etc/nsswitch.conf passwd: files ldap nisplus nis shadow: tcb ldap files nisplus nis group: files ldap nisplus nis hosts: files nisplus nis dns ethers: files netmasks: files networks: files protocols: files rpc: files services: files bootparams: nisplus [NOTFOUND=return] files netgroup: nisplus publickey: nisplus automount: files nisplus aliases: files nisplus Делаем следующее: $ ldapadd -x -D "cn=manager,dc=myserver,dc=myprovider,dc=ru" -w "secret" -f users.ldif adding new entry "dc=myserver, dc=myprovider, dc=ru" adding new entry "cn=Users, dc=myserver, dc=myprovider, dc=ru" adding new entry "cn=vasya, cn=Users, dc=myserver, dc=myprovider, dc=ru" $ ldapsearch -LL -H ldap://localhost -b "dc=myserver,dc=myprovider,dc=ru" version: 1 dn: dc=myserver, dc=myprovider, dc=ru objectClass: top dn: cn=Users, dc=myserver, dc=myprovider, dc=ru objectClass: top dn: cn=vasya, cn=Users, dc=myserver, dc=myprovider, dc=ru objectClass: posixAccount objectClass: shadowAccount cn: vasya uid: vasya uidNumber: 1000 gidNumber: 10 homeDirectory: /home/vasya loginShell: /bin/bash userPassword:: e21kNX0kMSRJT040U0lJSSRFWXlHRWVZdDRnMmhFZTl0aklDYWMu $ ldappasswd -x -D "cn=manager,dc=myserver,dc=myprovider,dc=ru" -w "secret" -s "1" "cn=vasya, cn=Users, dc=myserver, dc=myprovider, dc=ru" Result: Success (0) И вот теперь пытаемся подключиться: $ su - vasya Password: вводим 1 su: Authentication failure # tail /var/log/messages Apr 15 14:16:25 john-ws pam_tcb[23262]: su: Authentication failed for vasya from john(uid=501) Если сделать то же под рутом, то, никаких паролей спрашивать не станут, пустят сразу. Что я сделал не так? -- С уважением, Прокопьев Евгений
next reply other threads:[~2004-04-15 10:39 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-04-15 10:39 Eugene Prokopiev [this message] 2004-04-15 10:44 ` Eugene Prokopiev 2004-04-15 10:56 ` Eugene Prokopiev
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=407E6671.3060309@rmts.donpac.ru \ --to=john@rmts.donpac.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git