Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ubuntu 18.04server, solution to failure of encryption

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Failed to change password prompt:

passwd: Authentication token manipulation errorpasswd: password unchanged

Reason:

Insufficient user privileges

Solution steps:

1. Use chattr -i to remove the read-only attribute of/etc/shadow and/etc/passwd files (i.e., files cannot be deleted, renamed, set link relationships, and cannot write or add new content, which is different from the read-only attribute of chmod)

a. chattr -i /etc/shadow

b. chattr -i /etc/passwd

*c. lsattr -v /etc/passwd #This step is only for viewing file attribute information and can be omitted

2. change Password

a. pwconv #enables projected password modification, allowing only system administrators to read, while replacing the original password with the "x" character, effectively strengthening the security of the system.

b. passwd

3. restore properties

a. chattr +i /etc/passwd

b. chattr +i /ect/shadow

Knowledge expansion:

/ect/passwd : store user account and password information, password is "*"

/ect/shadow: store encrypted password, corresponding to/ect/passwd account

/ect/passwd and/etc/shadow files: blog.csdn.net/yaofeino1/article/details/54616440

chattr command: https://www.linuxprobe.com/linux-chattr-root.html

lsattr command: www.runoob.com/linux/linux-comm-lsattr.html

pwconv Command: http://www.runoob.com/linux/linux-comm-pwconv.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report