Lỗi an error occurred during the file system check centos năm 2024

In Linux, the passwd command is used to set or change user account passwords, while using this command sometimes users may encountered the error: “passwd: Authentication token manipulation error” as shown in below example.

Recently I was logging in to my CentOS server using my username “tecmint“. Once I am logged in I am trying to change my password using passwd utility, but a second after I am getting the following error messages.

su - tecmint

$ passwd tecmint Changing password for user tecmint Changing password for tecmint (current) UNIX password: passwd: Authentication token manipulation error In this article, we will explain different ways of fixing “passwd: Authentication token manipulation error” in Linux systems.

1. Reboot System

The first basic solution is to reboot your system. I can’t really tell why this worked, but it did worked for me on my CentOS 7.

$ sudo reboot If this fails, try out the next solutions.

2. Set Correct PAM Module Settings

Another possible cause of the “passwd: Authentication token manipulation error” is wrong PAM (Pluggable Authentication Module) settings. This makes the module unable to obtain the new authentication token entered.

The various settings for PAM are found in /etc/pam.d/.

$ ls -l /etc/pam.d/ -rw-r--r-- 1 root root 142 Mar 23 2017 abrt-cli-root -rw-r--r-- 1 root root 272 Mar 22 2017 atd -rw-r--r-- 1 root root 192 Jan 26 07:41 chfn -rw-r--r-- 1 root root 192 Jan 26 07:41 chsh -rw-r--r-- 1 root root 232 Mar 22 2017 config-util -rw-r--r-- 1 root root 293 Aug 23 2016 crond -rw-r--r-- 1 root root 115 Nov 11 2010 eject lrwxrwxrwx 1 root root 19 Apr 12 2012 fingerprint-auth -> fingerprint-auth-ac -rw-r--r-- 1 root root 659 Apr 10 2012 fingerprint-auth-ac -rw-r--r-- 1 root root 147 Oct 5 2009 halt -rw-r--r-- 1 root root 728 Jan 26 07:41 login -rw-r--r-- 1 root root 172 Nov 18 2016 newrole -rw-r--r-- 1 root root 154 Mar 22 2017 other -rw-r--r-- 1 root root 146 Nov 23 2015 passwd lrwxrwxrwx 1 root root 16 Apr 12 2012 password-auth -> password-auth-ac -rw-r--r-- 1 root root 896 Apr 10 2012 password-auth-ac .... For instance a mis-configured /etc/pam.d/common-password file can result into this error, running the pam-auth-update command with root privileges can fix the issue.

$ sudo pam-auth-update

3. Remount Root Partition

You might also see this error if the / partition is mounted as read only, which means no file can be modified thus a user’s password can’t be set or changed. To fix this error, you need to mount the root partition as as read/write as shown.

$ sudo mount -o remount,rw /

4. Set Correct Permissions on Shadow File

Wrong permissions on the /etc/shadow file, which stores actual passwords for user accounts in encrypted format can also cause this error. To check the permissions on this file, use the following command.

$ ls -l /etc/shadow To set the correct permissions on it, use the chmod command as follows.

$ sudo chmod 0640 /etc/shadow

5. Repair and Fix Filesystem Errors

Minor storage drive or filesystem errors can also cause the error in question. You can use Linux disk scanning tools such as fsck to fix such errors.

6. Free Up Disk Space

Furthermore, if your disk is full, then you can not modify any file on the disk especially when file’s size is meant to increase. This can also cause the above error. In this case, read our following articles to clean up disk space can help solve this error.

  1. Agedu – A Useful Tool for Tracking Down Wasted Disk Space in Linux
  2. BleachBit – A Free Disk Space Cleaner and Privacy Guard for Linux Systems
  3. How to Find and Remove Duplicate/Unwanted Files in Linux Using ‘FSlint’ Tool

You will also find these articles relating to managing user passwords in Linux.

  1. How to Reset Forgotten Root Password in RHEL/CentOS and Fedora
  2. How to Force User to Change Password at Next Login in Linux
  3. How to Run ‘sudo’ Command Without Entering a Password in Linux

That’s it for now! If you know any other solution to fix “passwd: Authentication token manipulation error”, let us know via the feedback form below. We will be grateful for your contribution.

Utilities

  • Subscriptions
  • Downloads
  • Containers
  • Support Cases

Infrastructure and Management

  • Red Hat Enterprise Linux
  • Red Hat Satellite
  • Red Hat Subscription Management
  • Red Hat Insights
  • Red Hat Ansible Automation Platform

Cloud Computing

  • Red Hat OpenShift
  • Red Hat OpenStack Platform
  • Red Hat OpenShift Container Platform
  • Red Hat OpenShift Data Science
  • Red Hat OpenShift Dedicated
  • Red Hat Advanced Cluster Security for Kubernetes
  • Red Hat Advanced Cluster Management for Kubernetes
  • Red Hat Quay
  • OpenShift Dev Spaces
  • Red Hat OpenShift Service on AWS

Storage

  • Red Hat Gluster Storage
  • Red Hat Hyperconverged Infrastructure
  • Red Hat Ceph Storage
  • Red Hat OpenShift Data Foundation

Runtimes

  • Red Hat Runtimes
  • Red Hat JBoss Enterprise Application Platform
  • Red Hat Data Grid
  • Red Hat JBoss Web Server
  • Red Hat Single Sign On
  • Red Hat support for Spring Boot
  • Red Hat build of Node.js
  • Red Hat build of Quarkus

Integration and Automation

All Products

Issue

  • During boot, the system hangs on fsck.
  • The machine begins the Checking Filesystems stage and stops with the following error:

    /dev/mapper/U01: UNEXPECTED INCONSISTENCY: [FAILED]

    An error occured during the file system check. Dropping you to a shell; the system will reboot * when you leave the shell.

    Give root password for maintenance

  • System cannot boot with the following messages in Red Hat Enterprise Linux 7.

    Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to try again to boot into default mode.

  • Then journalctl shows the followings:

    systemd-fsck: /dev/sdb1 contains a file system with errors, check forced. systemd-fsck: /dev/sdb1: Inodes that were part of a corrupted orphan linked list found. systemd-fsck: /dev/sdb1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. systemd-fsck: (i.e., without -a or -p options) systemd-fsck: fsck failed with error code 4. systemd-fsck: Running request emergency.target/start/replace

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • ex3 or ext4 file systems

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In