Manage centralized Identity Management content in a newly installed IdM environment.
Outcomes
Administer the Identity Management services.
Use the command-line interface.
Browse the API.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command prepares your environment and ensures that all required resources are available.
[student@workstation ~]$ lab start idm-management
Instructions
On the idm machine, stop and start the IdM service.
Log in to the idm machine as the student user, and then switch to the root user.
[student@workstation ~]$ssh idm[student@idm ~]$sudo -i[sudo] password for student:student
Review the /usr/lib/systemd/system/ipa.service systemd unit.
[Unit] Description=Identity, Policy, Audit Wants=network.target Wants=gssproxy.service After=network.target [Service] Type=oneshot Environment=LC_ALL=C.UTF-8 ExecStart=/usr/sbin/ipactl start ExecStop=/usr/sbin/ipactl stop RemainAfterExit=yes TimeoutSec=0 [Install] WantedBy=multi-user.target
Stop the ipa service.
[root@idm ~]# systemctl stop ipa.serviceVerify the status of the IdM services.
[root@idm ~]# ipactl status
Directory Service: STOPPED
Directory Service must be running in order to obtain status of other servicesStart the ipa service.
[root@idm ~]# systemctl start ipa.serviceVerify the status of the IdM services.
[root@idm ~]# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa: INFO: The ipactl command was successfulList available topics on the ipa command.
Determine and then use the appropriate commands to list all current IdM users.
View variables related to the configuration of the IdM server.
The lab command has already negotiated a Kerberos ticket as the admin user on the idm machine.
Kerberos authentication is discussed in a later chapter.
List the available topics, and then get help for managing users.
[root@idm ~]#ipa help topicsautomember Auto Membership Rule. automount Automount ca Manage Certificate Authorities caacl Manage CA ACL rules. cert IPA certificate operations certmap Certificate Identity Mapping certprofile Manage Certificate Profiles config Server configuration delegation Group to Group Delegation dns Domain Name System (DNS) domainlevel Raise the IPA Domain Level. ...output omitted... [root@idm ~]#ipa help user...output omitted... EXAMPLES: Add a new user: ipa user-add --first=Tim --last=User --password tuser1 Find all users whose entries include the string "Tim":ipa user-find TimFind all users with "Tim" as the first name: ipa user-find --first=Tim Disable a user account: ipa user-disable tuser1 ...output omitted...
List all IdM users.
[root@idm ~]# ipa user-find
--------------
1 user matched
--------------
User login: admin
Last name: Administrator
Home directory: /home/admin
Login shell: /bin/bash
Principal alias: admin@LAB.EXAMPLE.COM, root@LAB.EXAMPLE.COM
UID: 1138600000
GID: 1138600000
Account disabled: False
----------------------------
Number of entries returned 1
----------------------------View variables related to the configuration of the IdM server.
[root@idm ~]# ipa env
api_version: 2.249
basedn: dc=internal,dc=lab,dc=example,dc=com
bin: /usr/bin
ca_agent_port: 443
ca_host: idm.lab.example.com
ca_install_port: None
ca_port: 80
certmonger_wait_timeout: 300
conf: /etc/ipa/cli.conf
conf_default: /etc/ipa/default.conf
confdir: /etc/ipa
config_loaded: True
...output omitted...
tls_ca_cert: /etc/ipa/ca.crt
tls_version_max: None
tls_version_min: None
validate_api: False
verbose: 0
version: 4.10.0
wait_for_dns: 0
webui_prod: True
xmlrpc_uri: https://idm.lab.example.com/ipa/xml
-------------
120 variables
-------------Reviewing these variables can be useful during troubleshooting.
Use a web browser to explore the IdM API.
On the workstation machine, open a web browser and navigate to https://idm.lab.example.com/.
The browser displays a certificate warning because IdM uses a self-signed certificate. Click , and then click . Click to accept the self-signed certificate. Click on the warning page, and then click .
Log in as the admin user with RedHat123^ as the password.
Navigate to → .
In the field, type ^group_ and then select .
Note the headings for options and arguments, and that the cn argument is required.
Switch back to the SSH session, and review the API interactions of the ipa command.
Use the ipa command to show the details of the admins group.
Use the -vv option to show the JSON payload and response.
[root@idm ~]# ipa -vv group-show admins
ipa: INFO: Request: {
"id": 0,
"method": "ping",
"params": [
[],
{}
]
}
ipa: INFO: Response: {
"error": null,
"id": 0,
"principal": "admin@LAB.EXAMPLE.COM",
"result": {
"messages": [
{
"code": 13001,
"data": {
"server_version": "2.249"
},
"message": "API Version number was not sent, forward compatibility not guaranteed. Assuming server's API version, 2.249",
"name": "VersionMissing",
"type": "warning"
}
],
"summary": "IPA server version 4.10.0. API version 2.249"
},
"version": "4.10.0"
}
ipa: INFO: Request: {
"id": 0,
"method": "group_show/1",
"params": [
[
"admins"
],
{
"version": "2.249"
}
]
}
ipa: INFO: Response: {
"error": null,
"id": 0,
"principal": "admin@LAB.EXAMPLE.COM",
"result": {
"result": {
"cn": [
"admins"
],
"description": [
"Account administrators group"
],
"dn": "cn=admins,cn=groups,cn=accounts,dc=lab,dc=example,dc=com",
"gidnumber": [
"1138600000"
],
"member_user": [
"admin"
]
},
"summary": null,
"value": "admins"
},
"version": "4.10.0"
}
Group name: admins
Description: Account administrators group
GID: 1138600000
Member users: adminReturn to the workstation machine as the student user.
[root@idm ~]#exitlogout [student@idm ~]$exitlogout Connection to idm closed.