快盘下载:好资源、好软件、快快下载吧!

快盘排行|快盘最新

当前位置:首页软件教程电脑软件教程 → OpenEuler系统普通用户切换root不成功问题

OpenEuler系统普通用户切换root不成功问题

时间:2022-10-06 15:24:09人气:作者:快盘下载我要评论

#解决OpenEuler操作系统创建普通用户切换root用户报错。

提示报错如图;
*
OpenEuler系统普通用户切换root不成功问题

解决方法如下;

方法 1. 路径;/etc/pad.d/su 通过注释配置文件第21行使得能够进行切换
注释;PAM;Pluggable Authentication Modules;负责系统中很多应用程序的登录认证;安全设置问题

  1 #######################################################################################
  2 #
  3 # Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved.
  4 # security-tool licensed under the Mulan PSL v2.
  5 # You can use this software according to the terms and conditions of the Mulan PSL v2.
  6 # You may obtain a copy of Mulan PSL v2 at:
  7 #     http://license.coscl.org.cn/MulanPSL
  8 # THIS SOFTWARE IS PROVIDED ON AN ;AS IS; BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
  9 # IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
 10 # PURPOSE.
 11 # See the Mulan PSL v2 for more details.
 12 # Description: Configuration File for PAMified Services
 13 #
 14 #######################################################################################
 15 
 16 #%PAM-1.0
 17 auth            sufficient      pam_rootok.so
 18 # Uncomment the following line to implicitly trust users in the ;wheel; group.
 19 #auth           sufficient      pam_wheel.so trust use_uid
 20 # Uncomment the following line to require a user to be in the ;wheel; group.
 21 #auth           required        pam_wheel.so use_uid
 22 auth            substack        system-auth
 23 auth            include         postlogin
 24 account         sufficient      pam_succeed_if.so uid = 0 use_uid quiet
 25 account         include         system-auth
 26 password        include         system-auth
 27 session         include         system-auth
 28 session         include         postlogin
 29 session         optional        pam_xauth.so

方法 2. 对创建用户进行附加mygroup权限

usermod -G wheel username
#改变用户分组;将用户添加进wheel分组
#usermod [-G] [GroupName] [UserName]

#语法
# id username
id user1
#执行结果如下
uid=1008(user1) gid=1008(user1) groups=1008(user1),1012(mygroup)

网友评论

快盘下载暂未开通留言功能。

关于我们| 广告联络| 联系我们| 网站帮助| 免责声明| 软件发布

Copyright 2019-2029 【快快下载吧】 版权所有 快快下载吧 | 豫ICP备10006759号公安备案:41010502004165

声明: 快快下载吧上的所有软件和资料来源于互联网,仅供学习和研究使用,请测试后自行销毁,如有侵犯你版权的,请来信指出,本站将立即改正。