1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PowerVC サーバーで RHEL /etc/pam.d/su の pam_wheel.so を有効化した場合の対応

Last updated at Posted at 2025-05-25

はじめに

/etc/pam.d/su で pam_wheel.so を有効化すると、PowerVC GUI にログインできなくなる事象が発生しました。
解消方法をご参考までに記載します。


環境

RHEL 8.6

PowerVC 2.2.0 (on ppc64le)


/etc/pam.d/su で pam_wheel.so を有効化

/etc/pam.d/su で wheelグループに属しているユーザーのみ su コマンドを実行できるように、7行目の #auth required pam_wheel.so trust use_uid 行のコメントをはずします。

変更前

# cat /etc/pam.d/su
#%PAM-1.0
auth		required	pam_env.so
auth		sufficient	pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth		sufficient	pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth		required	pam_wheel.so use_uid
auth		substack	system-auth
auth		include		postlogin
account		sufficient	pam_succeed_if.so uid = 0 use_uid quiet
account		include		system-auth
password	include		system-auth
session		include		system-auth
session		include		postlogin
session		optional	pam_xauth.so

変更後

# cat /etc/pam.d/su
#%PAM-1.0
auth		required	pam_env.so
auth		sufficient	pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth		sufficient	pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
auth		required	pam_wheel.so use_uid      ###<= この行のコメントをはずしています。
auth		substack	system-auth
auth		include		postlogin
account		sufficient	pam_succeed_if.so uid = 0 use_uid quiet
account		include		system-auth
password	include		system-auth
session		include		system-auth
session		include		postlogin
session		optional	pam_xauth.so

PowerVC ログイン確認

上記の状態で PowerVC のGUI にログインを試みると、正しいパスワードを入力しているにもかかわらず、ログインできないという事象が発生します。

pvclogin.png


解決方法

/etc/group の修正

/etc/group の wheel グループを修正することでログインできるようになります。

  • /etc/group デフォルトの状態
# cat /etc/group
root:x:0:root
bin:x:1:
daemon:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mem:x:8:
kmem:x:9:
wheel:x:10:
cdrom:x:11:
mail:x:12:
man:x:15:
dialout:x:18:
floppy:x:19:
games:x:20:
tape:x:33:
video:x:39:
ftp:x:50:
lock:x:54:
audio:x:63:
users:x:100:
nobody:x:65534:
dbus:x:81:
utmp:x:22:
utempter:x:35:
input:x:999:
kvm:x:36:
render:x:998:
systemd-journal:x:190:
systemd-coredump:x:997:
systemd-resolve:x:193:
tss:x:59:clevis
polkitd:x:996:
geoclue:x:995:
service:x:994:
printadmin:x:993:
rtkit:x:172:
pipewire:x:992:
pulse-access:x:991:
pulse-rt:x:990:
pulse:x:171:
ssh_keys:x:989:
clevis:x:988:
unbound:x:987:
usbmuxd:x:113:
chrony:x:986:
avahi:x:70:
brlapi:x:985:
setroubleshoot:x:984:
libstoragemgmt:x:983:
cockpit-ws:x:982:
cockpit-wsinstance:x:981:
flatpak:x:980:
colord:x:979:
sssd:x:978:
gdm:x:42:
gnome-initial-setup:x:977:
sshd:x:74:
slocate:x:21:
dnsmasq:x:976:
tcpdump:x:72:
pvcservices:x:1000:cinder,glance,keystone,neutron,nova,ceilometer,panko,gnocchi,bumblebee,placement,swift,ttv-validation,clerk,pvcui
apache:x:48:
powervc-filter:x:1001:root
radvd:x:75:
saslauth:x:76:
memcached:x:975:
mysql:x:27:
epmd:x:974:
rabbitmq:x:973:
glance:x:1002:
neutron:x:1003:
gnocchi:x:972:
ceilometer:x:1004:
panko:x:1005:
nova:x:1006:
keystone:x:1007:
cinder:x:1008:
bumblebee:x:967:
placement:x:966:
swift:x:1009:
ttv-validation:x:965:
clerk:x:964:
mongod:x:963:
pvcui:x:962:
  • 修正後 (wheelグループ行のみ抜粋)
# cat /etc/group | grep wheel
wheel:x:10:root,cinder,glance,keystone,neutron,nova,ceilometer,panko,gnocchi,bumblebee,placement,swift,ttv-validation,clerk,pvcui

root と、pvcservices グループに記載があるユーザーを追記しています。

/etc/group の pvcservices 行は以下の内容です。

# cat /etc/group | grep pvcservices
pvcservices:x:1000:cinder,glance,keystone,neutron,nova,ceilometer,panko,gnocchi,bumblebee,placement,swift,ttv-validation,clerk,pvcui

なお、sudoers の wheel 設定は以下の状態です。

# cat /etc/sudoers | grep wheel
## Allows people in group wheel to run all commands
%wheel	ALL=(ALL)	ALL
# %wheel	ALL=(ALL)	NOPASSWD: ALL

確認

pvclogin2.png

root ユーザーでログイン情報を入力しました。

aftlogin.png

無事、ログインできました!


おわりに

/etc/pam.d/su で wheel グループのみ su を有効化する場合、PowerVC ユーザーを wheel グループに入れる必要がある、ということが判明しました。

PowerVC の Web インターフェースは、認証時にバックエンドでシステムユーザーとして su 操作が実行されていると推測され、pam_wheel.so が有効化されると、wheelグループに属していないユーザーでの su 実行が拒否されて、
結果的にWebログインが失敗する仕組みとなっていると考えられます。

なお、ログインで "失敗した試行の回数が多すぎます" と出る場合は、ブラウザを閉じて新しく開き直すことでリセットされます。

スクリーンショット 2025-05-25 9.05.39.png

以上です。

1
0
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?