Managing Network Clients Flashcards

DHCP, PAM, LDAP and OpenLDAP

1
Q

The 3 common DHCP client linux packages are

A

dhcpd, pump, dhclient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How would you install ISC’s DHCP server on Debian and on Redhat

A

Debian
apt-get install isc-dhcp-server
Redhat:
yum install dhcp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DHCP config file location

A

/etc/dhcp/dhcpd.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do the DHCP option lines look like in the config file?

A

Each option setting is on it’s own line and terminated with a semi-colon;

For example:
option domain-name-servers 10.0.10.10 10.0.10.11;
option smtp-server 10.0.10.100;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You see this in /etc/dhcp/dhcpd.conf - what does it do?

subnet 10.1.10.0 netmask 255.255.255.0 {
   option router 10.1.10.1;
   option broadcast-address 10.1.10.255;
   range 10.1.10.10 10.1.10.200;
}
A

This sets up the subnet 10.1.10.0, defining the router and the broadcast address. Then sets of pool of IP addresses to be used for clients 10.1.10.10 to 10.1.10.200

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

It is possible to declare multiple subnets in a single /etc/dhcp/dhcpd.conf file. True of False?

A

True. If multiple subnets share some settings they can be grouped together using the shared-net directive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where does the dhcpd package keep a record of IP address leases?

A

/var/lib/dhcp/dhcpd.leases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What 2 methods can you use to assign static IP addresses to clients when using DHCP

A

1 Set the static address on the client manually

2 Create a static host entry in the config file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You see this in /etc/dhcp/dhcpd.conf - what does it do?

host luna {
   hardware ethernet 00:02:01:EF:CD:AB;
   fixed-address 192.168.20.11;
   option router 192.168.20.1;
   option broadcast-address 192.168.20.255;
   netmask 255.255.255.0;
   option host-name "luna";
}
A

This is defining a static hostname in dhcpd.conf.

The hardware ethernet directive identifies the client with the clients mac address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the group directive do in the dhcpd.conf

A

group allows you to define a set of options that are shared. So for example, if you are setting up a number of static IP addresses in the config, you can use group to group them and share common settings with all the static clients.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which options are used in ISC DHCP to enable and use BOOTP?

A
Enable BOOTP:
   allow booting;
   allow bootp;
Use BOOTP, in each Host config use:
   filename "/abootfile.img";
   server-name = "bootp-server1";
   next-server = "bootp-server2";
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does PAM sand for and what does it do?

A

PAM = Pluggable Authentication Module
It provides a single interface for authentication.

Kerberos and NIS (network info service) provide a centralised database of network authentication - PAM improves on this by providing an API that allows the OS and other apps to use a single authentication method..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Common PAM module that uses the standard /etc/passwd and /etc/shadow files for authentication

A

pam_unix.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Common PAM module that uses Kerberos for authentication

A

pam_krb5.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Common PAM module that uses Lightweight Directory Access Protocol for authentication

A

pam_ldap.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Common PAM module that uses the Network Information Service (NIS) for authentication

A

pam_nis.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Common PAM module that uses System Security Services Daemon (SSSD) for authentication

A

pam_sss.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Common PAM module that uses standard .db database file for authentication

A

pam_userdb.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

PAM library module that is used to provide anonymous logins for public FTP servers

A

pam_access.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

PAM library module that is used to create a locked down area for logins

A

pam_chroot.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

PAM library module that is used to provide a console login environment

A

pam_console.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

PAM library module that is used to provide password strength checking

A

pam_cracklib.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

PAM library module that is used to prohibit login - this is often used as a default, fall-back option

A

pam_deny.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

PAM library module that is used to set or unset environment variables

A

pam_env.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

PAM library module that is used to provide the last login time for a user account

A

pam_lastlog.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

PAM library module that is used to enforce resource limits

A

pam_limits.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

PAM library module that is used to allow or deny actions based on a list file

A

pam_listfile.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Where is the pam config file usually located?

A

/etc/pam.conf or in separate files in the /etc/pam.d/ directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is the format of the pam.conf config lines?

A

service type control module arguments

e.g.
login auth required pam_unix.so

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

There are 4 groups of PAM feature types, they are

A

account - Account verification settings
auth - Authentication services
password - Password management services
session - External services (e.g. logging)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

There are four PAM control actions, they are

A

requiste - terminate the application if auth fails
required - return failure status if auth fails
sufficient - if this rule succeeds, stop processing with success status
optional - the rule is … optional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

LDAP stands for

A

Lightweight Directory Access Protocol.

OpenLDAP is the most popular implementation of LDAP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

LDAP database is based on hierarchical database design. Hierarchical databases are known for

A

fast read times and slow write times

34
Q

Each LDAP Database object is defined by an [answer1] and assigned a unique [answer2]

A

answer1 - ObjectClass

answer2 - Object ID

35
Q

an LDAP dc is

A

a domain context

36
Q

What is an LDAP dn

A

a distinguished name - a unique object name on the database.

e.g.
cn=”John”,dc=”Student”,dc=”lpi”,dc=”org”

37
Q

What is LDIF

A

LDAP Data interchange format

Example format:
dn: 
\: 
\: 
....
38
Q

What are the 3 methods of storing a LDAP database

A
  1. stand-alone - entire db on single server
  2. replication - entire db on multiple servers
  3. distribution - db spread across multiple servers
39
Q

OpenLDAP website

A

www.openldap.org

40
Q

What are the LDAP server and client packages in Debian based distros

A

slapd
ldap-utils

sudo apt-get install slapd ldap-utils

41
Q

What are the LDAP server and client packages in Redhat based distros

A

openldap-servers
openldap-clients

sudo yum install openldap-servers openldap-clients

42
Q

What is the main LDAP server program called.

A

slapd - it listens for LDAP connections

43
Q

slapd switch to choose an alternative configuration file

A

-f [config]

44
Q

slapd switch to choose a URL other than localhost for LDAP requests

A

-h [url]

45
Q

slapd switch to turn on debugging

A

-d [debuglevel]

46
Q

slapd switch to choose syslog level

A

-s [syslog]

47
Q

slapd switch to start slapd in a chroot jail

A

-r [dir]

48
Q

slapd switch to specify a user name to run slapd with

A

-u [user]

49
Q

slapd switch to specify a group to run slapd with

A

-g [group]

50
Q

What is slurpd?

A

slurpd is the ldap daemon used in replicated server environments.

51
Q

slurpd switch to specify debug level

A

-d [debug]

52
Q

slurpd switch to specify alternate configuration file to use

A

-f [config]

53
Q

slurpd switch to specify an alternative replication log

A

-r [replog]

54
Q

slurpd switch to specify an alternate processing directory

A

-t [dir]

55
Q

slurpd switch to specify that slurpd shoulld run once then stop

A

-o

56
Q

slurpd switch to specify an alternative kerberos srvtab file to use

A

-k [srvtab]

57
Q

In terms of LDAP, what is inet0rgperson

A

It is the most popular LDAP schema templates in the LDAP package. Provides white pages type directory.

58
Q

There are two methods for implementing openldap directory schemas they are…

A

in slapd.conf or

in slapd-config

59
Q

if using the slapd.conf method of implementing openldap, what are the 3 minimum configuration options to change

A

suffix
rootdn
rootpw

e.g.
suffix “dc=lpicstudy, dc=net”
rootdn “cn=administrator, dc=lpicstudy, dc=net”
rootpw testpassword

60
Q

What LDAP server utility can be used to generate an encrypted password for use in theslapd.conf file

A

slappasswd

utility will output password, that is entered into slapd.conf prefixed with {SHA} to indicate encryption

61
Q

What LDAP server utility can be used to re-index the LDAP database

A

slapindex

62
Q

What LDAP server utility can be used to output the LDAP configuration into LDIF format?

A

slapcat

63
Q

What LDAP server utility can be used to add new objects to the LDAP database

A

slapadd

e.g. after stopping slapd
slapadd -l ldif.txt

64
Q

If using the slapd-config method of implementing LDAP, how do you modify the config files in /etc/slap.d?

A

You don’t. Use the LDAP utilities to add and modify objects in the LDAP database

65
Q

LDAP client tool to add objects to the database

A

ldapadd

66
Q

LDAP client tool to remove objects from the database

A

ldapdelete

67
Q

LDAP client tool to modify objects in the database

A

ldapmodify

68
Q

LDAP client tool to change a user password

A

ldappasswd

69
Q

LDAP client tool to search the database for objects

A

ldapsearch

70
Q

ldapmodify switch to add a new object

A

-a

71
Q

ldapmodify switch to use a distinguished name to login to the LDAP directory

A

-D [dn]

72
Q

ldapmodify switch to use a file (with LDIF entries)

A

-f [file]

73
Q

ldapmodify switch to use verbose mode

A

-v

74
Q

ldapmodify switch to specify a password

A

-w [password]

75
Q

ldapmodify switch prompt for a password

A

-W

76
Q

ldapsearch switch to specify the distinguished name in which to start the search

A

-b [base]

77
Q

ldapsearch switch to output the search results in LDIF format

A

-L

78
Q

ldapsearch switch to use verbose mode

A

-v

79
Q

ldapsearch switch to specify a password

A

-w [password]

80
Q

ldapsearch switch to prompt for a password

A

-W

81
Q

ldapsearch switch to use TLS

A

-Z

82
Q

What is this doing?

ldapsearch -b ‘dc=lpicstudy, dc=net’ ‘(objectclass=*)’

A

Search the LDAP directory for any object (wildcard *) starting at the dc-lpicstudy,dc=net base dn.