Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

如何处理修改密码报错passwd:Permission denied

Problem description

In Linux, the system prompts "passwd:Permission denied" when changing the root password.

Solution

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

Follow these steps to troubleshoot the problem.

  1. Check whether the /etc/passwd, /etc/shadow, and /etc/pam.dfiles have the required permissions.
  2. By looking at the /var/log/securelog, you can see the prompt "several files do not exist, Module error" in the secure log.
  3. Run the following commands to track the password change process. The strace log files are listed with the "/r" tag.
    strace -o /tmp/changepasswd passwd root
  4. Check the file format of /etc/pam.d/system-auth-ac. If the file format is DOS, run the following command to adjust the format:
    dos2unix system-auth-ac

Scope

  • Elastic Compute Service


This post first appeared on IT瘾 | IT社区推荐资讯, please read the originial post: here

Share the post

如何处理修改密码报错passwd:Permission denied

×

Subscribe to It瘾 | It社区推荐资讯

Get updates delivered right to your inbox!

Thank you for your subscription

×