36.6. Modifying an IdM ID view
An ID view in Identity Management (IdM) overrides a POSIX attribute value associated with a specific IdM user. Follow this procedure to modify an existing ID view. Specifically, it describes how to modify an ID view to enable the user named idm_user to use the /home/user_1234/ directory as the user home directory instead of /home/idm_user/ on the client1.idm.example.com IdM client.
Prerequisites
- You have root access to the IdM client system.
- You are logged in as a user with the required privileges, for example admin.
- You have an ID view configured for idm_user that applies to the IdM client.
Procedure
On the IdM client, create the directory that you want idm_user to use on client1.idm.example.com as the user home directory:
# mkdir /home/user_1234/On the IdM client, change the ownership of the directory:
# chown idm_user:idm_user /home/user_1234/On the IdM server, display the ID view, including the hosts to which the ID view is currently applied. To display the ID view named
example_for_client1:$ ipa idview-show example_for_client1 --all dn: cn=example_for_client1,cn=views,cn=accounts,dc=idm,dc=example,dc=com ID View Name: example_for_client1 User object override: idm_user Hosts the view applies to: client1.idm.example.com objectclass: ipaIDView, top, nsContainerThe output shows that the ID view currently applies to client1.idm.example.com.
On the IdM server, modify the user override of the example_for_client1 ID view. To override the user home directory:
-
Enter the
ipa idoverrideuser-addcommand - Add the name of the ID view
- Add the user name, also called the anchor
Add the
--homediroption:$ ipa idoverrideuser-mod example_for_client1 idm_user --homedir=/home/user_1234 ----------------------------- Modified a User ID override "idm_user" ----------------------------- Anchor to override: idm_user User login: user_1234 Home directory: /home/user_1234/
For a list of the available options, run
ipa idoverrideuser-mod --help.-
Enter the
To apply the new configuration to the client1.idm.example.com system immediately:
SSH to the IdM client system as root:
$ ssh root@client1 Password:On the IdM client, clear the SSSD cache:
# sss_cache -E- On the IdM client, restart the SSSD daemon:
# systemctl restart sssd
Verification
SSHto the client system as idm_user:# ssh idm_user@client1.idm.example.com Password: Last login: Sun Jun 21 22:34:25 2020 from 192.168.122.229 [user_1234@client1 ~]$On the client system, print the working directory:
$ pwd /home/user_1234/