/etc/nsswitch.conf.
1
2
3
4
5
6
7
8
9
10
11
12
13
dn: uid=ghopper,ou=People,dc=navy,dc=mil
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: ghopper
cn: Grace Hopper
userPassword: {crypt}$1$pZaGA2RL$MPDJoc0afuhHY6k8HQFp0
loginShell: /bin/bash
uidNumber: 1202
gidNumber: 1202
homeDirectory: /home/ghopper
| Attribute | Stand for | What it is |
|---|---|---|
| o | Organization | Identifies a site’s top-level entry (not used at sites that model their hierarchy on DNS) |
| ou | Organizational Unit | A logical subdivision, e.g. “marketing” |
| cn | Common name | The most natural name to represent the entry |
| dc | Domain component | Used at sites that model their hierarchy on DNS |
| objectClass | Object class | Schema to which this entry’s attributes conform |
webserver and call webserver-ldap.
profile.py to match the following contentwebserver and call webserver-ldap.
profile.py to match the following contentldap node and run the following commands
1
2
3
clear
sudo apt update
sudo apt install -y slapd ldap-utils
Tab key to go to Ok, then press Enter.Tab, Ok, and Enter again.
1
sudo dpkg-reconfigure slapd
No (or make sure that you stay on No), then press Enter.wcupa.edu as default DNS domain name Tab key to go to Ok, then press Enter.wcupa.edu as the name of the organization to use in the base DN Tab key to go to Ok, then press Enter.Tab key to go to Ok, then press Enter.Tab key to go to Ok, then press Enter.Yes to remove the database when slapd is purged. Tab key to go to Yes, then press Enter.Yes to move old database Tab key to go to Yes, then press Enter.
1
sudo ufw allow ldap
basedn.ldif with the following contents
1
2
3
4
5
6
7
ldapadd -x -D cn=admin,dc=wcupa,dc=edu -W -f basedn.ldif
Enter LDAP Password:
adding new entry "ou=People,dc=wcupa,dc=edu"
adding new entry "ou=Groups,dc=wcupa,dc=edu"
adding new entry "cn=CSC,ou=Groups,dc=wcupa,dc=edu"
rammy
1
2
3
4
slappasswd
New password:
Re-enter new password:
{SSHA}N8Rfc9lvnKb8A3oUOxUOBlDen4v8FYL/
users.ldif using the following content userPassword field with the password hash you just created.
1
2
3
ldapadd -x -D cn=admin,dc=wcupa,dc=edu -W -f users.ldif
Enter LDAP Password:
adding new entry "uid=student,ou=People,dc=wcupa,dc=edu"
1
2
3
4
ldapsearch -x -LLL -b dc=wcupa,dc=edu 'uid=student' cn gidNumber
dn: uid=student,ou=People,dc=wcupa,dc=edu
cn: student
gidNumber: 5000
webserver node and run the following commands
1
2
3
4
clear
sudo apt update
sudo apt-get update
sudo apt install -y libnss-ldap libpam-ldap ldap-utils
ldap-auth-config profile.py, ldap will have 192.168.1.3 as a predefined IP address.cat /etc/hosts on ldap.ldap://192.168.1.3 as LDAP server Uniform Resource Identifier. dc=wcupa,dc=edu 3 Yes No cn=admin,dc=wcupa,dc=edu sudo nano /etc/nsswitch.conf passwd and group to: compat systemd ldap sudo nano /etc/pam.d/common-password use_authtok and delete that phrasesudo nano /etc/pam.d/common-session session optional pam_mkhomedir.so skel=/etc/skel umask=077 student on webserver via LDAP
1
2
3
4
5
getent passwd student
student:x:10000:5000:Golden Ram:/home/student:/bin/dash
lngo@webserver:~$ su student
Password:
$