linux一直用户身份验证失败,linux – chsh:PAM身份验证失败

我想更改默认的

shell env

并以root用户身份运行chsh -s / bin / zsh,

但出现错误消息:chsh:PAM身份验证失败.

但答案并没有解决我的问题

任何帮助,将不胜感激

这是/etc/pam.d/chsh的内容

#

# The PAM configuration file for the Shadow `chsh' service

#

# This will not allow a user to change their shell unless

# their current one is listed in /etc/shells. This keeps

# accounts with special shells from changing them.

auth required pam_shells.so

# This allows root to change user shell without being

# prompted for a password

auth sufficient pam_rootok.so

# The standard Unix authentication modules,used with

# NIS (man nsswitch) as well as normal /etc/passwd and

# /etc/shadow entries.

@include common-auth

@include common-account

@include common-session

这是/ etc / shells的内容

# /etc/shells: valid login shells

/bin/sh

/bin/dash

/bin/bash

/bin/rbash

/usr/bin/tmux

/usr/bin/screen

/bin/zsh

/usr/bin/zsh

我发现我曾经运行chsh -s zsh

这将改变/ etc / passwd的第一行为

root:x:0:0:root:/root:zsh

并且chsh会在你尝试时询问密码

我只是手动编辑/ etc / passwd文件,一切正常.

愚蠢的错误,谢谢你的回复

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值