/l3/users/10-12-2007/unix-win/linux3.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 |
|
#slapcat | grep -i account
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User objectClass: account #pam_password ad objectClass: posixAccount objectClass: shadowAccount # configure --enable-authpassword is no longer supported structuralObjectClass: account ... #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#vim /etc/ldap.conf
|
#getent passwd
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin haldaemon:x:68:68:HAL daemon:/:/sbin/nologin ident:x:98:98::/home/ident:/sbin/nologin mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin gdm:x:42:42::/var/gdm:/sbin/nologin rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false 208,1 81% |
#vim /etc/ldap.conf
|
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false |
#vim /etc/ldap.conf
|
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
72c72 < ################pam_filter objectclass=account --- > pam_filter objectclass=account |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
75c75 < ################pam_login_attribute uid --- > pam_login_attribute uid |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
|
#getent passwd
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin ident:x:98:98::/home/ident:/sbin/nologin mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin gdm:x:42:42::/var/gdm:/sbin/nologin rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash 208,1 81% |
#vim /etc/ldap.conf
126c126 < ################pam_password md5 --- > pam_password md5 |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
167,171c167,171 < ################nss_base_passwd ou=Users,dc=mydc,dc=local?one < ################nss_base_passwd ou=Computers,dc=mydc,dc=local?one < ################nss_base_shadow ou=Users,dc=mydc,dc=local?one < ################nss_base_group ou=Groups,dc=mydc,dc=local?one < ################nss_base_hosts ou=Computers,dc=mydc,dc=local?one --- > nss_base_passwd ou=Users,dc=mydc,dc=local?one > nss_base_passwd ou=Computers,dc=mydc,dc=local?one > nss_base_shadow ou=Users,dc=mydc,dc=local?one > nss_base_group ou=Groups,dc=mydc,dc=local?one > nss_base_hosts ou=Computers,dc=mydc,dc=local?one |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false |
#vim /etc/ldap.conf
171c171 < nss_base_hosts ou=Computers,dc=mydc,dc=local?one --- > #nss_base_hosts ou=Computers,dc=mydc,dc=local?one |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false |
#vim /etc/ldap.conf
|
#getent passwd
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin haldaemon:x:68:68:HAL daemon:/:/sbin/nologin ident:x:98:98::/home/ident:/sbin/nologin mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin gdm:x:42:42::/var/gdm:/sbin/nologin rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false 208,1 81% |
#vim /etc/ldap.conf
|
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false |
#vim /etc/ldap.conf
167c167 < nss_base_passwd ou=Users,dc=mydc,dc=local?one --- > #nss_base_passwd ou=Users,dc=mydc,dc=local?one |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
260c260 < ###################################ssl no --- > ssl no |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false admin:x:0:0:Ldap admin:/root:/bin/bash testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
167,171c167,171 < #nss_base_passwd ou=Users,dc=mydc,dc=local?one < #nss_base_passwd ou=Computers,dc=mydc,dc=local?one < #nss_base_shadow ou=Users,dc=mydc,dc=local?one < #nss_base_group ou=Groups,dc=mydc,dc=local?one < #nss_base_hosts ou=Computers,dc=mydc,dc=local?one --- > ##nss_base_passwd ou=Users,dc=mydc,dc=local?one > ##nss_base_passwd ou=Computers,dc=mydc,dc=local?one > ##nss_base_shadow ou=Users,dc=mydc,dc=local?one > ##nss_base_group ou=Groups,dc=mydc,dc=local?one > ##nss_base_hosts ou=Computers,dc=mydc,dc=local?one |
#slapcat | less
|
#vim /etc/ldap.conf
|
#yum search ldap
programs needed for accessing and modifying OpenLDAP directories. http://www.openldap.org/ nss_ldap.i386 234-4 installed Matched from: nss_ldap NSS library and PAM module for LDAP. This package includes two LDAP access clients: nss_ldap and pam_ldap. Nss_ldap is a set of C library extensions that allow X.500 and LDAP directory servers to be used as a primary source of aliases, ethers, groups, hosts, networks, protocol, users, RPCs, services, and shadow passwords (instead of or in addition to using flat files or NIS). Pam_ldap is a module for Linux-PAM that supports password changes, V2 clients, Netscape's SSL, ypldapd, Netscape Directory Server password policies, access authorization, and crypted hashes. 208,1 81% |
#vim /etc/ldap.conf
167,171c167,171 < ##nss_base_passwd ou=Users,dc=mydc,dc=local?one < ##nss_base_passwd ou=Computers,dc=mydc,dc=local?one < ##nss_base_shadow ou=Users,dc=mydc,dc=local?one < ##nss_base_group ou=Groups,dc=mydc,dc=local?one < ##nss_base_hosts ou=Computers,dc=mydc,dc=local?one --- > nss_base_passwd ou=Users,dc=mydc,dc=local?one > nss_base_passwd ou=Computers,dc=mydc,dc=local?one > nss_base_shadow ou=Users,dc=mydc,dc=local?one > nss_base_group ou=Groups,dc=mydc,dc=local?one > nss_base_hosts ou=Computers,dc=mydc,dc=local?one |
#slapcat | less
|
#vim /etc/openldap/ldif
|
#yum install directory_administrator
Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 333 k Is this ok [y/N]: y Downloading Packages: (1/1): directory_administ 100% |=========================| 333 kB 00:42 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: directory_administrator ######################### [1/1] Installed: directory_administrator.i386 0:1.7.1-1.110asp Complete! 208,1 81% |
#ldapsearch -D cn=admin,dc=mydc,dc=local -x -W -b "
#nss_map_attribute uid userName #nss_map_attribute gidNumber gid Dependencies Resolved #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar ============================================================================= #nss_map_objectclass posixGroup aixAccessGroup Package Arch Version Repository Size #nss_base_group ou=aixgroup,?one ============================================================================= ... directory_administrator i386 1.7.1-1.110asp base 333 k Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 333 k Is this ok [y/N]: y Downloading Packages: 208,1 81% |
#ldapsearch -D cn=admin,dc=mydc,dc=local -x -W -b "dc=mydc,dc=local" "(cn=testuser)"
Enter LDAP Password: # extended LDIF # # LDAPv3 # base <dc=mydc,dc=local> with scope sub # filter: (cn=testuser) # requesting: ALL # # search result search: 2 result: 0 Success # numResponses: 1 |
#slapcat | less
|
#ldapsearch -D cn=admin,dc=mydc,dc=local -x -W -b "dc=mydc,dc=local" "(cn=testuser)"
|
#vim /etc/openldap/ldif
|
#vim /etc/openldap/ldif
|
#vim /etc/openldap/ldif2
1c1 < dn: ou=Computers,dc=mydc,dc=local --- > dn: ou=Users,dc=mydc,dc=local 4c4 < ou: Computers --- > ou: Users |
#directory_administrator
Icon list realized - setting up drag and drop Intentando conectar interactivamente Existe solo un perfil de conexion called: app_connect with profile name: ldap Se conecto con exito called: refresh_directory_data get_orgunit_dn_list: filtering entries for orgunits' DNs Fetching uid=testuser,ou=Users,dc=mydc,dc=local from directory get_group_cn_list: filtering entries for groups' CNs No posix groups available for translating gid to group name ... called: refresh_directory_data get_orgunit_dn_list: filtering entries for orgunits' DNs Fetching uid=testuser,ou=Users,dc=mydc,dc=local from directory get_group_cn_list: filtering entries for groups' CNs No posix groups available for translating gid to group name o Fetching samba domains from directory with base ou=Users,dc=mydc,dc=local Gtk-CRITICAL **: file gtkcombo.c: line 849 (gtk_combo_set_popdown_strings): assertion `strings != NULL' failed. ** WARNING **: Widget not found: sambaDomainMappingDropdown Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkCombo' Gtk-CRITICAL **: file gtkcombo.c: line 847 (gtk_combo_set_popdown_strings): assertion `combo != NULL' failed. |
#slapadd -l /etc/openldap/ldif2 -v
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User added: "ou=Users,dc=mydc,dc=local" (00000006) #pam_password ad # configure --enable-authpassword is no longer supported # AuthPassword mappings #nss_map_attribute userPassword authPassword # AIX SecureWay mappings #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#ldapsearch -D cn=admin,dc=mydc,dc=local -x -W -b "dc=mydc,dc=local" "(cn=testuser)"
Enter LDAP Password: # extended LDIF # # LDAPv3 # base <dc=mydc,dc=local> with scope sub # filter: (cn=testuser) # requesting: ALL # # search result search: 2 result: 0 Success # numResponses: 1 |
#testparm
Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[printers]" Processing section "[myshare]" Loaded services file OK. Server role: ROLE_DOMAIN_PDC Press enter to see a dump of your service definitions |
#getent passwd
dbus:x:81:81:System message bus:/:/sbin/nologin haldaemon:x:68:68:HAL daemon:/:/sbin/nologin ident:x:98:98::/home/ident:/sbin/nologin mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin gdm:x:42:42::/var/gdm:/sbin/nologin rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash 208,1 81% |
#vim /etc/openldap/ldif2
|
#yum search luma
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User Searching Packages: #pam_password ad Setting up repositories Reading repository metadata in from local files # configure --enable-authpassword is no longer supported No Matches found ... #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#smbclient //192.168.16.3/vnc
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User Error connecting to 192.168.16.3 (В соединении отказано) #pam_password ad Connection to 192.168.16.3 failed # configure --enable-authpassword is no longer supported # AuthPassword mappings #nss_map_attribute userPassword authPassword # AIX SecureWay mappings #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#smbclient //192.168.16.254/vnc
Clicked preferences - processing and closing dialog Password: Domain=[TECH] OS=[Unix] Server=[Samba 3.0.26a] Server not using user level security and no password supplied. smb: \> ls . D 0 Thu Dec 13 18:24:47 2007 .. D 0 Mon Dec 10 11:15:19 2007 vnc-4_1_2-x86_win32.exe A 739240 Tue Dec 11 10:52:49 2007 openldap-2.2.29-1.FC4.i386.rpm 256514 Thu Dec 13 18:24:50 2007 phpldapadmin-1.0.2.tar.gz 788484 Thu Dec 13 15:37:35 2007 vnc-3.3.7-x86_win32.exe 577239 Fri Aug 24 20:56:05 2007 34330 blocks of size 524288. 11832 blocks available smb: \> get phpldapadmin-1.0.2.tar.gz getting file \phpldapadmin-1.0.2.tar.gz of size 788484 as phpldapadmin-1.0.2.tar.gz (5347,2 kb/s) (average 5347,2 kb/s) smb: \> exit 208,1 81% |
#ls
get_orgunit_dn_list: filtering entries for orgunits' DNs called: refresh_directory_data disconnected: list emptied Selected row 0 Gtk-WARNING **: gtk_signal_disconnect(): could not find handler (1148) Gtk-WARNING **: gtk_signal_disconnect(): could not find handler (1149) Now a dialog box with the profile information should pop up final_settings.err install logs.tgz mbox phpldapadmin-1.0.2.tar.gz Templates 208,1 81% |
#vim /etc/openldap/slapd.conf
22c22 < modulepath /usr/lib/ --- > #modulepath /usr/lib/ |
#ls
final_settings.err install logs.tgz mbox phpldapadmin-1.0.2.tar.gz Templates |
#yum install httpd
Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for httpd to pack into transaction set. httpd-2.0.54-10.4.1.3asp. 100% |=========================| 75 kB 00:06 ---> Package httpd.i386 0:2.0.54-10.4.1.3asp set to be updated --> Running transaction check ... Is this ok [y/N]: y Downloading Packages: (1/1): httpd-2.0.54-10.4. 100% |=========================| 946 kB 01:21 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: httpd ######################### [1/1] Installed: httpd.i386 0:2.0.54-10.4.1.3asp Complete! |
#tar xvzfC phpldapadmin-1.0.2.tar.gz /var/www/html/
phpldapadmin-1.0.2/htdocs/images/host.png phpldapadmin-1.0.2/htdocs/images/find.png phpldapadmin-1.0.2/htdocs/images/network.png phpldapadmin-1.0.2/htdocs/images/mail_alias.png phpldapadmin-1.0.2/htdocs/images/terminal.png phpldapadmin-1.0.2/htdocs/images/ldap-server.png phpldapadmin-1.0.2/htdocs/images/hard-drive.png phpldapadmin-1.0.2/htdocs/images/light.png phpldapadmin-1.0.2/htdocs/images/add.png phpldapadmin-1.0.2/htdocs/images/go.png ... phpldapadmin-1.0.2/tools/po/make_po_es phpldapadmin-1.0.2/tools/po/make_mo phpldapadmin-1.0.2/tools/po/make_po_it phpldapadmin-1.0.2/tools/po/messages.header phpldapadmin-1.0.2/tools/po/make_po_ca phpldapadmin-1.0.2/INSTALL phpldapadmin-1.0.2/doc/ phpldapadmin-1.0.2/doc/pla-test-i18n.ldif phpldapadmin-1.0.2/doc/README-translation.txt phpldapadmin-1.0.2/index.php |
#ls /var/www/html/
phpldapadmin-1.0.2 |
#cd /var/www/html/phpldapadmin-1.0.2/
|
#ls *.conf
ls: *.conf: Нет такого файла или каталога |
#ls
config doc htdocs index.php INSTALL lib LICENSE locale templates tools VERSION |
#cd config/
|
#ls
config.php.example |
#cp config.php.example config.php
|
#vim config.php
|
#/etc/init.d/httpd start
Запускается httpd: [ ОК ] |
#vim /var/www/html/phpldapadmin-1.0.2/config/config.php
109c109 < // $ldapservers->SetValue($i,'server','auth_type','cookie'); --- > $ldapservers->SetValue($i,'server','auth_type','session'); |
#vim /etc/httpd/conf/httpd.conf
|
#less
|
#less
|
#less INSTALL
|
#vim /etc/httpd/conf/httpd.conf
|
#less INSTALL
|
#getent passwd
Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for php-ldap to pack into transaction set. php-ldap-5.0.4-10.5.i386. 100% |=========================| 13 kB 00:00 ---> Package php-ldap.i386 0:5.0.4-10.5 set to be updated --> Running transaction check ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false apache:x:48:48:Apache:/var/www:/sbin/nologin testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#yum install php-ldap
Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for php-ldap to pack into transaction set. php-ldap-5.0.4-10.5.i386. 100% |=========================| 13 kB 00:00 ---> Package php-ldap.i386 0:5.0.4-10.5 set to be updated --> Running transaction check ... Is this ok [y/N]: y Downloading Packages: (1/3): php-pear-5.0.4-10. 100% |=========================| 376 kB 00:45 (2/3): php-ldap-5.0.4-10. 100% |=========================| 28 kB 00:04 (3/3): php-5.0.4-10.5.i38 100% |=========================| 2.3 MB 05:09 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: php ######################### [1/3] |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false apache:x:48:48:Apache:/var/www:/sbin/nologin testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#vim /etc/ldap.conf
75c75 < pam_login_attribute uid --- > pam_login_attribute cn |
#/etc/init.d/httpd restart
Останавливается httpd: [ ОК ] Запускается httpd: [ ОК ] |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false apache:x:48:48:Apache:/var/www:/sbin/nologin testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash testt:x:1000:500:Test Test:/home/users/Group1/tt:/bin/bash |
#/etc/init.d/ldap stop
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User Останавливается slapd: [ ОК ] #pam_password ad # configure --enable-authpassword is no longer supported # AuthPassword mappings #nss_map_attribute userPassword authPassword # AIX SecureWay mappings #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false apache:x:48:48:Apache:/var/www:/sbin/nologin |
#/etc/init.d/ldap start
Checking configuration files for slapd: config file testing succeeded [ ОК ] Запускается slapd: [ ОК ] |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false apache:x:48:48:Apache:/var/www:/sbin/nologin testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash Configuration Files Configuration Files |
#egrep -v '^#|^\ *$' /etc/ldap.conf
host 127.0.0.1 base dc=mydc,dc=local rootbindn cn=admin,dc=mydc,dc=local pam_filter objectclass=account pam_login_attribute uid pam_login_attribute userPrincipalName pam_template_login_attribute uid pam_template_login nobody pam_password md5 nss_base_passwd ou=Users,dc=mydc,dc=local?one nss_base_passwd ou=Computers,dc=mydc,dc=local?one nss_base_shadow ou=Users,dc=mydc,dc=local?one nss_base_group ou=Groups,dc=mydc,dc=local?one nss_base_hosts ou=Computers,dc=mydc,dc=local?one nss_map_attribute rfc2307attribute mapped_attribute nss_map_objectclass rfc2307objectclass mapped_objectclass ssl no |
#egrep -v '^#|^\ *$' /etc/nsswitch.conf
passwd: files ldap shadow: files ldap group: files ldap hosts: files dns bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files netgroup: nisplus publickey: nisplus automount: files nisplus aliases: files nisplus |
#egrep -v '^#|^\ *$' /etc/ldap.secret
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User rootpass #pam_password ad # configure --enable-authpassword is no longer supported # AuthPassword mappings #nss_map_attribute userPassword authPassword # AIX SecureWay mappings #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#egrep -v '^#|^\ *$' /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/nis.schema include /etc/openldap/schema/samba.schema allow bind_v2 ldap://192.168.16.3/ pidfile /var/run/slapd.pid argsfile /var/run/slapd.args access to attrs=userPassword,shadowLastChange,sambaLMPassword,sambaNTPassword,sambaPwdLastSet,sambaPwdMustChange ... database bdb suffix "dc=mydc,dc=local" rootdn "cn=admin,dc=mydc,dc=local" rootpw rootpass directory /var/lib/ldap index objectClass eq,pres index ou,cn,mail,surname,givenname eq,pres,sub index uidNumber,gidNumber,loginShell eq,pres index uid,memberUid eq,pres,sub index nisMapName,nisMapEntry eq,pres,sub |
#egrep -v '^#|^\ *$' /var/www/html/phpldapadmin-1.0.2/config/config.php
$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))'; /* The attributes to return */ $queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto'; /* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */ $q++; $queries[$q]['name'] = 'Samba Users'; $queries[$q]['base'] = 'dc=example,dc=com'; $queries[$q]['scope'] = 'sub'; $queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))'; $queries[$q]['attributes'] = 'uid, smbHome, uidNumber'; $q++; $queries[$q]['name'] = 'Samba Computers'; $queries[$q]['base'] = 'dc=example,dc=com'; $queries[$q]['scope'] = 'sub'; $queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))'; $queries[$q]['attributes'] = 'uid, homeDirectory'; ?> 208,1 81% |
#egrep -v '^#|^\ *$|^\$' /var/www/html/phpldapadmin-1.0.2/config/config.php
/* Add "modify group members" link to the attribute. */ // $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid') /* Configure filter for member search. This only applies to "modify group members" feature */ // $config->custom->modify_member['filter'] = '(objectclass=Person)'; /* Attribute that is added to the group member attribute. */ // $config->custom->modify_member['attr'] = 'dn'; /*********************************************/ /* Predefined Queries (canned views) */ /*********************************************/ /* To make searching easier, you may setup predefined queries below: */ /* The name that will appear in the simple search form */ /* The base to search on */ /* The search scope (sub, base, one) */ /* The LDAP filter to use */ /* The attributes to return */ /* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */ ?> 208,1 81% |
#egrep -v '^#|^\ *$|^\$|^\/' /var/www/html/phpldapadmin-1.0
screen. Do this by adding the desired attributes to this list (and uncomment it). This only affects the editor screen. Attributes will still be visible in the schema browser and elsewhere. An example is provided below: NOTE: The user must be able to read the hidden_except_dn entry to be excluded. */ $hidden_attrs. */ meaning that users will not be presented a form for modifying those attributes, and they will not be allowed to be modified on the "back-end" either. You may configure this list here: NOTE: The user must be able to read the read_only_except_dn entry to be excluded. */ (ie: not belong to other entries in your tree. This (together with unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to occur with other attributes have the same value. NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to present a user with the option of changing the unique attributes. */ ?> 208,1 81% |
#cat /var/www/html/phpldapadmin-1.0.2/config/config.php
$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto'; /* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */ $q++; $queries[$q]['name'] = 'Samba Users'; $queries[$q]['base'] = 'dc=example,dc=com'; $queries[$q]['scope'] = 'sub'; $queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))'; $queries[$q]['attributes'] = 'uid, smbHome, uidNumber'; $q++; $queries[$q]['name'] = 'Samba Computers'; $queries[$q]['base'] = 'dc=example,dc=com'; $queries[$q]['scope'] = 'sub'; $queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))'; $queries[$q]['attributes'] = 'uid, homeDirectory'; ?> 208,1 81% |
#slapcat
createTimestamp: 20071214074930Z modifyTimestamp: 20071214074930Z entryCSN: 20071214074930Z#000001#00#000000 dn: cn=Group1,ou=Groups,dc=mydc,dc=local objectClass: top objectClass: posixGroup gidNumber: 500 cn: Group1 structuralObjectClass: posixGroup entryUUID: 8cf5f28e-3e73-102c-8fed-8a81a212048c creatorsName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214093445Z entryCSN: 20071214093445Z#000001#00#000000 modifiersName: cn=admin,dc=mydc,dc=local modifyTimestamp: 20071214093445Z 208,1 81% |
#getent passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: ... nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin nscd:x:28:28:NSCD Daemon:/:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin pcap:x:77:77::/var/arpwatch:/sbin/nologin pvm:x:24:24::/usr/share/pvm3:/bin/bash user:x:500:500:user:/home/user:/bin/bash ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false apache:x:48:48:Apache:/var/www:/sbin/nologin testuser:x:65000:65000:TESTUSER:/home/tetsuser:/bin/bash |
#slapcat > /tmp/slapcat
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User #pam_password ad # configure --enable-authpassword is no longer supported # AuthPassword mappings #nss_map_attribute userPassword authPassword # AIX SecureWay mappings #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#cat /tmp/slapcat
dn: dc=mydc,dc=local objectClass: top objectClass: dcObject objectClass: organization o: mydc dc: Mydc description: Directory of MYDCLOCAL structuralObjectClass: organization entryUUID: 93ece4f0-3e26-102c-80c3-b2e23bbd16b2 creatorsName: cn=admin,dc=mydc,dc=local ... objectClass: posixGroup gidNumber: 500 cn: Group1 structuralObjectClass: posixGroup entryUUID: 8cf5f28e-3e73-102c-8fed-8a81a212048c creatorsName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214093445Z entryCSN: 20071214093445Z#000001#00#000000 modifiersName: cn=admin,dc=mydc,dc=local modifyTimestamp: 20071214093445Z |
#egrep -v '^#|^\ *$' /etc/ldap.secret
base_group ou=aixgroup,?one #pam_login_attribute sAMAccountName cn groupName #pam_filter objectclass=User rootpass #pam_password ad # configure --enable-authpassword is no longer supported # AuthPassword mappings #nss_map_attribute userPassword authPassword # AIX SecureWay mappings #nss_map_objectclass posixAccount aixAccount #nss_base_passwd ou=aixaccount,?one #nss_map_attribute uid userName #nss_map_attribute gidNumber gid #nss_map_attribute uidNumber uid #nss_map_attribute userPassword passwordChar #nss_map_objectclass posixGroup aixAccessGroup #nss_base_group ou=aixgroup,?one #nss_map_attribute cn groupName 208,1 81% |
#cat /etc/ldap.secret
rootpass |
rootpass
dn: dc=mydc,dc=local objectClass: top objectClass: dcObject objectClass: organization o: mydc dc: Mydc description: Directory of MYDCLOCAL structuralObjectClass: organization entryUUID: 93ece4f0-3e26-102c-80c3-b2e23bbd16b2 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214002346Z modifyTimestamp: 20071214002346Z entryCSN: 20071214002346Z#000001#00#000000 dn: uid=admin,dc=mydc,dc=local uid: admin cn: root objectClass: account objectClass: posixAccount objectClass: top objectClass: shadowAccount userPassword:: e1NTSEF9M1cxNWM5VmoreTFOK2ZlNW1BL0RHV3VEY0hHRlNRUEk= loginShell: /bin/bash uidNumber: 0 gidNumber: 0 homeDirectory: /root gecos: Ldap admin structuralObjectClass: account description: Admin Ladp entryUUID: 93f61a52-3e26-102c-80c4-b2e23bbd16b2 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214002346Z modifyTimestamp: 20071214002346Z entryCSN: 20071214002346Z#000002#00#000000 dn: ou=Groups,dc=mydc,dc=local objectClass: top objectClass: organizationalUnit ou: Groups structuralObjectClass: organizationalUnit entryUUID: 94155aa2-3e26-102c-80c5-b2e23bbd16b2 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214002346Z modifyTimestamp: 20071214002346Z entryCSN: 20071214002346Z#000003#00#000000 dn: ou=Idmap,dc=mydc,dc=local objectClass: top objectClass: organizationalUnit ou: Idmap structuralObjectClass: organizationalUnit entryUUID: 941e3eec-3e26-102c-80c6-b2e23bbd16b2 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214002346Z modifyTimestamp: 20071214002346Z entryCSN: 20071214002346Z#000004#00#000000 dn: ou=Computers,dc=mydc,dc=local objectClass: top objectClass: organizationalUnit ou: Computers structuralObjectClass: organizationalUnit entryUUID: cc1a5436-3e29-102c-84f0-df3bfe193d09 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214004648Z modifyTimestamp: 20071214004648Z entryCSN: 20071214004648Z#000001#00#000000 dn: ou=Users,dc=mydc,dc=local objectClass: top objectClass: organizationalUnit ou: Users structuralObjectClass: organizationalUnit entryUUID: 885fad9a-3e6f-102c-9c15-a14eedb62ef9 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214090600Z modifyTimestamp: 20071214090600Z entryCSN: 20071214090600Z#000001#00#000000 dn: uid=testuser,ou=Users,dc=mydc,dc=local uid: testuser cn: User objectClass: account objectClass: posixAccount objectClass: top objectClass: shadowAccount userPassword:: e1NTSEF9M1cxNWM5VmoreTFOK2ZlNW1BL0RHV3VEY0hHRlNRUEk= loginShell: /bin/bash uidNumber: 65000 gidNumber: 65000 homeDirectory: /home/tetsuser gecos: TESTUSER structuralObjectClass: account entryUUID: d8a60fb6-3e64-102c-80ed-cdf7ad1f7811 creatorsName: cn=admin,dc=mydc,dc=local modifiersName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214074930Z modifyTimestamp: 20071214074930Z entryCSN: 20071214074930Z#000001#00#000000 dn: cn=Group1,ou=Groups,dc=mydc,dc=local objectClass: top objectClass: posixGroup gidNumber: 500 cn: Group1 structuralObjectClass: posixGroup entryUUID: 8cf5f28e-3e73-102c-8fed-8a81a212048c creatorsName: cn=admin,dc=mydc,dc=local createTimestamp: 20071214093445Z entryCSN: 20071214093445Z#000001#00#000000 modifiersName: cn=admin,dc=mydc,dc=local modifyTimestamp: 20071214093445Z
$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto'; /* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */ $q++; $queries[$q]['name'] = 'Samba Users'; $queries[$q]['base'] = 'dc=example,dc=com'; $queries[$q]['scope'] = 'sub'; $queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))'; $queries[$q]['attributes'] = 'uid, smbHome, uidNumber'; $q++; $queries[$q]['name'] = 'Samba Computers'; $queries[$q]['base'] = 'dc=example,dc=com'; $queries[$q]['scope'] = 'sub'; $queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))'; $queries[$q]['attributes'] = 'uid, homeDirectory'; ?> 208,1 81%
Время первой команды журнала | 10:55:39 2007-12-14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:41:23 2007-12-14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.07 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.76 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 2.16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008