CentOS 8
Sponsored Link

FreeIPA : User Accounts Management
2019/10/15
 
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: 20191015062958Z
  Email address: centos@ipa.srv.world
  UID: 1244800005
  GID: 1244800005
  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 users 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: 1244800005
  GID: 1244800005
  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: 1244800005
  gidnumber: 1244800005
  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: 1244800006
[7] Add members to a FreeIPA group account.
[root@dlp ~]#
ipa group-add-member --users=redhat development

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

  Group name: hiroshima
  GID: 1244800007
  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: 1244800006
----------------------------
Number of entries returned 1
----------------------------
[10] Remove FreeIPA group accounts.
[root@dlp ~]#
ipa group-del hiroshima

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