CentOS 7
Sponsored Link

FreeIPA : ユーザーID 管理の基本操作2015/03/21

[1] FreeIPA ユーザーアカウントを追加する。
[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: FL
  Home directory: /home/centos
  GECOS: CentOS Linux
  Login shell: /bin/bash
  Principal name: centos@IPA.SRV.WORLD
  Principal alias: centos@IPA.SRV.WORLD
  User password expiration: 20171226013407Z
  Email address: centos@ipa.srv.world
  UID: 590800001
  GID: 590800001
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True
[2] FreeIPA ユーザーアカウントをロック/アンロックする。
[root@dlp ~]#
ipa user-disable centos

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

---------------------------
Enabled user account "centos"
---------------------------
[3] FreeIPA ユーザーアカウントを検索する。
[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/bash
  Principal name: centos@IPA.SRV.WORLD
  Principal alias: centos@IPA.SRV.WORLD
  Email address: centos@ipa.srv.world
  UID: 590800001
  GID: 590800001
  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/bash
  krbcanonicalname: centos@IPA.SRV.WORLD
  krbprincipalname: centos@IPA.SRV.WORLD
  mail: centos@ipa.srv.world
  uidnumber: 590800001
  gidnumber: 590800001
  nsaccountlock: FALSE
  has_password: TRUE
  has_keytab: TRUE
[4] FreeIPA ユーザーアカウントを削除する。
[root@dlp ~]#
ipa user-del centos

-------------------
Deleted user "centos"
-------------------
[5] FreeIPA グループを追加する。
[root@dlp ~]#
ipa group-add --desc='Development Group' development

-------------------------
Added group "development"
-------------------------
  Group name: development
  Description: Development Group
  GID: 1781800006
[6] FreeIPA グループへメンバーを追加する。
[root@dlp ~]#
ipa group-add-member --users=redhat,ubuntu development

  Group name: development
  Description: Development Group
  GID: 1781800006
  Member users: redhat, ubuntu
-------------------------
Number of members added 2
-------------------------
[7] FreeIPA グループへグループを入れ子で追加する。
[root@dlp ~]#
ipa group-add-member --groups=development hiroshima

  Group name: hiroshima
  Description: State Group
  GID: 1781800007
  Member groups: development
-------------------------
Number of members added 1
-------------------------
[8] FreeIPA グループを検索する。
[root@dlp ~]#
ipa group-find development

---------------
1 group matched
---------------
  Group name: development
  Description: Development Group
  GID: 1781800006
  Member users: redhat, ubuntu
  Member of groups: hiroshima
----------------------------
Number of entries returned 1
----------------------------
[9] FreeIPA グループを削除する。
[root@dlp ~]#
ipa group-del hiroshima

-------------------------
Deleted group "hiroshima"
-------------------------
関連コンテンツ