FreeIPA : ユーザー管理の基本操作2021/08/04 |
FreeIPA ユーザーアカウント管理の基本的な操作方法です。
|
|
[1] | FreeIPA ユーザーアカウントを追加する。 |
[root@dlp ~]# ipa user-add rocky --first=Rocky --last=Linux --password
Password: # パスワード設定
Enter Password again to verify:
------------------
Added user "rocky"
------------------
User login: rocky
First name: Rocky
Last name: Linux
Full name: Rocky Linux
Display name: Rocky Linux
Initials: RL
Home directory: /home/rocky
GECOS: Rocky Linux
Login shell: /bin/sh
Principal name: rocky@IPA.SRV.WORLD
Principal alias: rocky@IPA.SRV.WORLD
User password expiration: 20210804010641Z
Email address: rocky@ipa.srv.world
UID: 1435800001
GID: 1435800001
Password: True
Member of groups: ipausers
Kerberos keys available: True
|
[2] | FreeIPA ユーザーアカウントのパスワードを変更する。 |
[root@dlp ~]# ipa passwd rocky New Password: Enter New Password again to verify: ------------------------------------------ Changed password for "rocky@IPA.SRV.WORLD" ------------------------------------------ |
[3] | FreeIPA ユーザーアカウントをロック/アンロックする。 |
[root@dlp ~]# ipa user-disable rocky ----------------------------- Disabled user account "rocky" -----------------------------[root@dlp ~]# ipa user-enable rocky ---------------------------- Enabled user account "rocky" ---------------------------- |
[4] | FreeIPA ユーザーアカウントを検索する。 |
[root@dlp ~]# ipa user-find rocky -------------- 1 user matched -------------- User login: rocky First name: Rocky Last name: Linux Home directory: /home/rocky Login shell: /bin/sh Principal name: rocky@IPA.SRV.WORLD Principal alias: rocky@IPA.SRV.WORLD Email address: rocky@ipa.srv.world UID: 1435800001 GID: 1435800001 Account disabled: False ---------------------------- Number of entries returned 1 ----------------------------[root@dlp ~]# ipa user-show --raw rocky uid: rocky givenname: Rocky sn: Linux homedirectory: /home/rocky loginshell: /bin/sh krbcanonicalname: rocky@IPA.SRV.WORLD krbprincipalname: rocky@IPA.SRV.WORLD mail: rocky@ipa.srv.world uidnumber: 1435800001 gidnumber: 1435800001 nsaccountlock: FALSE has_password: TRUE has_keytab: TRUE |
[5] | FreeIPA ユーザーアカウントを削除する。 |
[root@dlp ~]# ipa user-del rocky ------------------- Deleted user "rocky" ------------------- |
[6] | FreeIPA グループを追加する。 |
[root@dlp ~]# ipa group-add --desc='Development Group' development ------------------------- Added group "development" ------------------------- Group name: development Description: Development Group GID: 1435800005 |
[7] | FreeIPA グループへメンバーを追加する。 |
[root@dlp ~]# ipa group-add-member --users=redhat development Group name: development Description: Development Group GID: 1435800005 Member users: redhat ------------------------- Number of members added 1 ------------------------- |
[8] | FreeIPA グループへグループを入れ子で追加する。 |
[root@dlp ~]# ipa group-add-member --groups=development hiroshima Group name: hiroshima Description: Hiroshima Group GID: 1435800006 Member groups: development Indirect Member users: redhat ------------------------- Number of members added 1 ------------------------- |
[9] | FreeIPA グループを検索する。 |
[root@dlp ~]# ipa group-find development --------------- 1 group matched --------------- Group name: development Description: Development Group GID: 1435800005 ---------------------------- Number of entries returned 1 ---------------------------- |
[10] | FreeIPA グループを削除する。 |
[root@dlp ~]# ipa group-del hiroshima ------------------------- Deleted group "hiroshima" ------------------------- |
Sponsored Link |
|