CentOS Stream 9
Sponsored Link

FreeIPA : User Accounts Management2022/03/23

 
This is the Basic Operation of User Accounts Management.
[1] Add FreeIPA user accounts.
[root@dlp ~]#
ipa user-add centos --first=CentOS --last=Linux --password

Password:
Enter Password again to verify:
-------------------
Added user "centos"
-------------------
  User login: centos
  First name: CentOS
  Last name: Linux
  Full name: CentOS Linux
  Display name: CentOS Linux
  Initials: CL
  Home directory: /home/centos
  GECOS: CentOS Linux
  Login shell: /bin/sh
  Principal name: centos@IPA.SRV.WORLD
  Principal alias: centos@IPA.SRV.WORLD
  User password expiration: 20220323011234Z
  Email address: centos@ipa.srv.world
  UID: 374000008
  GID: 374000008
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True
[2] Change password of FreeIPA user account.
[root@dlp ~]#
ipa passwd centos

New Password:
Enter New Password again to verify:
-------------------------------------------
Changed password for "centos@IPA.SRV.WORLD"
-------------------------------------------
[3] Lock or Unlock FreeIPA user accounts.
[root@dlp ~]#
ipa user-disable centos

------------------------------
Disabled user account "centos"
------------------------------
[root@dlp ~]#
ipa user-enable centos

-----------------------------
Enabled user account "centos"
-----------------------------
[4] Search FreeIPA user accounts.
[root@dlp ~]#
ipa user-find centos

--------------
1 user matched
--------------
  User login: centos
  First name: CentOS
  Last name: Linux
  Home directory: /home/centos
  Login shell: /bin/sh
  Principal name: centos@IPA.SRV.WORLD
  Principal alias: centos@IPA.SRV.WORLD
  Email address: centos@ipa.srv.world
  UID: 374000008
  GID: 374000008
  Account disabled: False
----------------------------
Number of entries returned 1
----------------------------

[root@dlp ~]#
ipa user-show --raw centos

  uid: centos
  givenname: CentOS
  sn: Linux
  homedirectory: /home/centos
  loginshell: /bin/sh
  krbcanonicalname: centos@IPA.SRV.WORLD
  krbprincipalname: centos@IPA.SRV.WORLD
  mail: centos@ipa.srv.world
  uidnumber: 374000008
  gidnumber: 374000008
  nsaccountlock: FALSE
  has_password: TRUE
  has_keytab: TRUE
[5] Remove FreeIPA user accounts.
[root@dlp ~]#
ipa user-del centos

---------------------
Deleted user "centos"
---------------------
[6] Add FreeIPA group accounts.
[root@dlp ~]#
ipa group-add --desc='Development Group' development

-------------------------
Added group "development"
-------------------------
  Group name: development
  Description: Development Group
  GID: 374000009
[7] Add members to a FreeIPA group account.
[root@dlp ~]#
ipa group-add-member --users=redhat development

  Group name: development
  Description: Development Group
  GID: 374000009
  Member users: redhat
-------------------------
Number of members added 1
-------------------------
[8] Add FreeIPA group to FreeIPA group nested.
[root@dlp ~]#
ipa group-add-member --groups=development hiroshima

  Group name: hiroshima
  Description: Hiroshima Group
  GID: 374000010
  Member groups: development
  Indirect Member users: redhat
-------------------------
Number of members added 1
-------------------------
[9] Search FreeIPA group accounts.
[root@dlp ~]#
ipa group-find development

---------------
1 group matched
---------------
  Group name: development
  Description: Development Group
  GID: 374000009
----------------------------
Number of entries returned 1
----------------------------
[10] Remove FreeIPA group accounts.
[root@dlp ~]#
ipa group-del hiroshima

-------------------------
Deleted group "hiroshima"
-------------------------
Matched Content