NetWorker:authc_configure.sh 卡住,当按 Enter 键时失败,并显示错误:用户 nsrtomcat 在路径 /nsr/authc/conf 上没有读取权限

概要: 运行authc_configure.sh 脚本卡住,按输入次数时失败,并显示消息:用户 nsrtomcat 在路径 /nsr/authc/conf 上没有读取权限。 本文是文章编号的扩展名:000044255详细介绍 Red Hat 8 Linux 环境中遇到的情况,以及如何在 Linux 管理员的帮助下解决该问题。在阅读本文之前,请先浏览一下。本文详细介绍文章编号中提到的情景 1:000044255 ...

この記事は次に適用されます: この記事は次には適用されません: この記事は、特定の製品に関連付けられていません。 すべての製品パージョンがこの記事に記載されているわけではありません。

現象

运行authc_configure.sh 脚本卡住,按输入次数时失败,并显示消息:用户 nsrtomcat 在路径 /nsr/authc/conf 上没有读取权限。


根据 文章编号:000044255重新编写脚本,它也会卡住,当按 Enter 键多次失败时,会出现相同的错误,确认问题在操作系统级别,与 NetWorker 无关。
 
[root@hostname ]# cat check_nsrtomcat.sh
command="[ -r /nsr/authc ]"
su - nsrtomcat -s /bin/sh -c "$command" > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "ERROR: User nsrtomcat does not have read permission at path /nsr/authc"
fi

[root@hostname ]# ./check_nsrtomcat.sh

ERROR: User nsrtomcat does not have read permission at path /nsr/authc

在 root 用户提示符处,尝试切换到用户 nsrtomcat,并意识到提示输入密码。
 
[root@hostname ]# su - nsrtomcat
Last failed login: Tue Oct 25 05:42:28 CDT 2022 on pts/0
There were 5 failed login attempts since the last successful login.
This account is currently not available.
[root@hostname]#

原因

在 PAM sudo 文件中进行排序,这使切换到不同的用户与请求密码的根用户提示不同。

解決方法

在了解/了解更改的影响后,Linux 管理员应执行以下解决方案。
在 PAM sudo 文件中更改订购,以便从 root 用户提示更改为其他用户,则不会要求输入密码。

1.创建 origingal /etc/pam.d/su 文件的拷贝:
[root@hostname ]# cd /etc/pam.d
[root@hostname pam.d]# cp su su.orig

2.编辑文件 /etc/pam.d/su,以便重新排序“auth sufficient pam_rootok.so”。

下面显示了编辑之前的文件内容。
[root@hostname pam.d]# cat su
#%PAM-1.0
auth required pam_wheel.so use_uid
authrequiredpam_env.so
auth sufficient pam_wheel.so trust use_uid
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#authsufficientpam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#authrequiredpam_wheel.so use_uid
authsubstacksystem-auth
auth include system-auth
authincludepostlogin
accountsufficientpam_succeed_if.so uid = 0 use_uid quiet
accountincludesystem-auth
passwordincludesystem-auth
sessionincludesystem-auth
sessionincludepostlogin
sessionoptionalpam_xauth.so
下面显示了重新排序后的文件内容。
[root@hostname pam.d]# cat su
#%PAM-1.0
auth            sufficient      pam_rootok.so
auth required pam_wheel.so use_uid
authrequiredpam_env.so
auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to implicitly trust users in the "wheel" group.
#authsufficientpam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#authrequiredpam_wheel.so use_uid
authsubstacksystem-auth
auth include system-auth
authincludepostlogin
accountsufficientpam_succeed_if.so uid = 0 use_uid quiet
accountincludesystem-auth
passwordincludesystem-auth
sessionincludesystem-auth
sessionincludepostlogin
sessionoptionalpam_xauth.so

3.重新运行authc_configure.sh,并成功结束,并显示消息“The installation completed successfully”(安装已成功完成)。

文書のプロパティ
文書番号: 000204907
文書の種類: Solution
最終更新: 07 11月 2022
バージョン:  1
質問に対する他のDellユーザーからの回答を見つける
サポート サービス
お使いのデバイスがサポート サービスの対象かどうかを確認してください。