Chpasswd authentication token manipulation error

Fixing ‘Authentication Token Manipulation Error’ in Ubuntu Linux Recently, I was changing password of a user in Linux when I encountered this ‘Authentication Token Manipulation Error’. I used the usual passwd command to change the password and it threw me this error and password was not changed. Fixing Authentication Token Manipulation Error in Ubuntu […]

Содержание

  1. Fixing ‘Authentication Token Manipulation Error’ in Ubuntu Linux
  2. Fixing Authentication Token Manipulation Error in Ubuntu
  3. Method 1
  4. Method 2
  5. How to Fix “passwd: Authentication token manipulation error” in Linux
  6. Как исправить ошибку “passwd: Authentication token manipulation error” на Linux
  7. 1. Перезагрузка системы
  8. 2. Установите правильные настройки модуля PAM
  9. 3. Перезапись раздела root
  10. 4. Установите правильные разрешения в файле shadow
  11. 5. Восстановление и исправление ошибок файловой системы.
  12. 6. Освободите дисковое пространство
  13. Ошибка Authentication token manipulation error
  14. Что значит «passwd: Authentication token manipulation error»?
  15. Как исправить «Authentication token manipulation error»
  16. 1. Права доступа
  17. 2. Файловая система только для чтения
  18. 3. Модули аутентификации
  19. 4. Свободное место на диске
  20. 5. Ошибки файловой системы
  21. 6. Другие решения
  22. Выводы
  23. How to Fix “passwd: Authentication token manipulation error” in Linux
  24. 1. Reboot System
  25. 2. Set Correct PAM Module Settings
  26. 3. Remount Root Partition
  27. 4. Set Correct Permissions on Shadow File
  28. 5. Repair and Fix Filesystem Errors
  29. 6. Free Up Disk Space
  30. If You Appreciate What We Do Here On TecMint, You Should Consider:

Fixing ‘Authentication Token Manipulation Error’ in Ubuntu Linux

Recently, I was changing password of a user in Linux when I encountered this ‘Authentication Token Manipulation Error’.

I used the usual passwd command to change the password and it threw me this error and password was not changed.

Fixing Authentication Token Manipulation Error in Ubuntu

The ‘Authentication Token Manipulation Error’ simply means that for some reasons, the password change wasn’t successful.

There could be a number of reasons for that. In simple cases, you’ll see the root cause of the issue in the output itself. For example, if you didn’t supply a password, you should see it in the error:

Similarly, if the password retype mismatched, it will show that info as well:

That’s easy because you know what caused the issue and you can take a corrective action based on that. But you might not always be that lucky because in some cases, you won’t see any useful information, just the error.

Let’s see some of these cases and fix this issue.

Method 1

If you know the Linux directory structure, you know that the /etc/shadow directory keeps the password in encrypted format along with a few other information about users and their password.

This is why you should make sure that you have the permission to read and write on this file. Since you’ll be changing the password as the superuser, this file should have read and write permission for the root.

If that’s not the case, then you should set the correct permission:

Method 2

The method 1 will work in most cases. But in my case, I had to remount root partition with read and write permission. I was trying to reset my admin password in Ubuntu actually.

In some rare cases, your disk might be so full that you cannot make any changes to the /etc/shadow file. But if that’s the case, then you’ll be facing a lot of other issues as well.

Did it work for you?

I shared what worked for me and I can only hope that it worked for you as well. Did it? Which method worked for you? Do mention it in the comments.

Источник

How to Fix “passwd: Authentication token manipulation error” in Linux

In this article, we are going to see how to Fix “passwd: Authentication token manipulation error” in Linux. In a Linux system when you try to change your password you will come across Authentication Token Manipulation Error and what this means is, for some reason your password change was not successful at all.

There can be many reasons for that like if you don’t supply the password output will give you the information “No password supply” or if the password is mismatched output will give you the information “Sorry, passwords do not match” then in both the cases you will be getting Authentication Token Manipulation Error. Well in these cases you know what is causing the error right and you can simply fix it

But there are cases where you won’t see any information, and the output will be an Authentication token manipulation error

Let’s see the other cases and how to fix the error:

Method 1: Reboot System

Try rebooting the system it does work, and you won’t get the same error

After rebooting the system try again it does fix the error.

Method 2: Set Correct Permissions on Shadow File.

In a Linux system, the /etc/shadow file keeps the password or stores the actual password for a user account in an encrypted format and this can be the reason behind the error. It can be fixed by setting the correct permission on it

To set the correct permissions on it, use the below chmod command.

Method 3: Remount Root Partition

If the partition is mounted as read-only as you will get the error that means no files can be modified, which means a user’s password can’t be changed, since you have to change the password you must mount the root partition as read/write

The below command will do that and will fix the error:

Method 4: Clean the Disk Space

Sometimes, when your disk gets full then also creates an Authentication token manipulation error. So in this case we will clear all the space and try to log in again. There are some tools you can use to clean the disk space: Agedu, BleachBit.

Method 5: Repair the Filesystem file.

We can also use this technique to overcome this error, you can use disk cleaning space such as fsck tools.

Источник

Как исправить ошибку “passwd: Authentication token manipulation error” на Linux

В Linux команда passwd используется для установки или изменения паролей учетных записей пользователей, в то время как при использовании этой команды иногда пользователи могут столкнуться с ошибкой: passwd: Authentication token manipulation error, как показано ниже.

Недавно я зашел на мой CentOS-сервер, используя мое имя пользователя tecmint. Как только я вошел в систему я пытаюсь изменить свой пароль с помощью утилиты passwd, но через секунду после получаю следующие сообщения об ошибках.

В этой статье мы расскажем о различных способах исправления ошибки в системах Linux.

1. Перезагрузка системы

Первым основным решением является перезагрузка системы.

Я не могу сказать, почему это сработало, но это сработало для меня на моем CentOS 7.

Если это не удается, попробуйте следующие решения.

2. Установите правильные настройки модуля PAM

Другой возможной причиной ошибки является неправильный параметр PAM (Pluggable Authentication Module).

Это делает модуль неспособным получить введенный новый токен аутентификации.

Различные параметры для PAM находятся в /etc/pam.d/.

Например, неверно сконфигурированный файл /etc/pam.d/common-password может привести к этой ошибке, и при запуске команды pam-auth-update с правами root можно исправить эту проблему.

3. Перезапись раздела root

Вы также можете увидеть эту ошибку, если / partition установлен только для чтения, что означает, что файл не может быть изменен, поэтому пароль пользователя не может быть установлен или изменен.

Чтобы исправить эту ошибку, необходимо установить корневой раздел как чтение / запись, как показано ниже:

4. Установите правильные разрешения в файле shadow

Неправильные разрешения на файл /etc/shadow, который хранит фактические пароли для учетных записей пользователей в зашифрованном формате, также могут вызвать эту ошибку.

Чтобы проверить разрешения для этого файла, используйте следующую команду.

Чтобы установить для него правильные разрешения, используйте команду chmod следующим образом.

5. Восстановление и исправление ошибок файловой системы.

Незначительные ошибки накопителя или файловой системы также могут вызвать ошибку.

Вы можете использовать инструменты для проверки диска Linux, такие как fsck, для исправления таких ошибок.

6. Освободите дисковое пространство

Кроме того, если ваш диск заполнен, вы не можете изменять какой-либо файл на диске, особенно когда размер файла должен увеличиваться.

Это также может привести к вышеуказанной ошибке.

Источник

Ошибка Authentication token manipulation error

Для смены паролей пользователей в Linux можно использовать утилиту passwd. Утилита позволяет сменить пароль для текущего пользователя или для любого другого, если у вас есть полномочия суперпользователя. Иногда при попытке смены пароля вы можете получить ошибку Authentication token manipulation error.

В этой статье мы рассмотрим, как исправить её, а также почему она возникает.

Что значит «passwd: Authentication token manipulation error»?

Если переводить дословно, то эта ошибка означает, что утилита для управления паролями passwd не может манипулировать токеном. Под токеном здесь подразумивается хєш пароля, который вы указали. Это может возникнуть из-за невозможности записать новый хэш в файл конфигурации, потому что:

  • У программы нет прав на запись в файл /etc/shadow;
  • Файловая система примонтирована в режиме только для чтения;
  • Повреждение файловой системы;
  • На диске нет свободного места;
  • Используется неверный модуль аутентификации;

А теперь давайте рассмотрим, как исправить каждую из этих проблем, чтобы убрать ошибку.

Как исправить «Authentication token manipulation error»

1. Права доступа

Ошибка в работе утилиты может возникнуть, если установлены неправильные полномочия на файл /etc/shadow, в котором хранятся пароли. Смотрим текущие полномочия командой:

У вас чтение и запись должны быть выставлены как на снимке, если это не так, выполните такую команду:

sudo chmod 0640 /etc/shadow

2. Файловая система только для чтения

Если вы загрузились в режиме восстановления Ubuntu или подобном режиме другого дистрибутива, то по умолчанию файловая система будет находиться в режиме только для чтения, соответственно утилита не сможет ничего записать. Чтобы перемонтировать её для записи, используйте:

sudo mount -o remount,rw /

3. Модули аутентификации

Ещё одной причиной может быть неправильная настройка модулей аутентификации, из-за которой утилита не может сохранить пароль. Доступные модули можно посмотреть командой:

Запустить обновление настроек модулей можно, выполнив от имени суперпользователя:

На первом шаге надо нажать Ok:

Затем выбрать с помощью пробела и стрелок нужные модули, переключиться с помощью Tab на Ok и сохранить.

4. Свободное место на диске

Естественно, утилита не сможет изменить пароль, если на диске не будет свободного места. Убедитесь, что есть, как минимум, несколько сотен свободных мегабайт на корневом разделе. Это можно сделать с помощью команды:

А посмотреть, какие файлы занимают больше всего места, и удалить ненужное можно с помощью ncdu:

Если утилита не установлена, то её можно установить с помощью пакетного менеджера. Название пакета такое же как и у команды:

sudo apt install ncdu

5. Ошибки файловой системы

Если файловая система была повреждена, то это тоже может стать причиной проблем с изменением пароля. Для проверки и восстановления файловой системы можно использоваться fsck. Но для работы утилиты файловая система должна быть отмонтирована.

Здесь вместо /dev/sda3 необходимо указать адрес вашего раздела жёсткого диска.

6. Другие решения

Ещё многие советуют перезагрузить систему, возможно, это поможет:

Также можно не изменять пароль, а сначала удалить старый такой командой:

sudo passwd -d имя_пользоватлея

А затем установить новый:

sudo passwd имя_пользователя

Выводы

В этой статье мы рассмотрели, как исправить ошибку «passwd: Authentication token manipulation error». Теперь вы знаете, что с ней делать, если она возникнет на вашем компьютере.

Источник

How to Fix “passwd: Authentication token manipulation error” in Linux

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.

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.

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/.

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.

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.

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.

To set the correct permissions on it, use the chmod command as follows.

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.

You will also find these articles relating to managing user passwords 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.

Tutorial Feedback.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Для смены паролей пользователей в Linux можно использовать утилиту passwd. Утилита позволяет сменить пароль для текущего пользователя или для любого другого, если у вас есть полномочия суперпользователя. Иногда при попытке смены пароля вы можете получить ошибку Authentication token manipulation error.

В этой статье мы рассмотрим, как исправить её, а также почему она возникает.

Если переводить дословно, то эта ошибка означает, что утилита для управления паролями passwd не может манипулировать токеном. Под токеном здесь подразумивается хєш пароля, который вы указали. Это может возникнуть из-за невозможности записать новый хэш в файл конфигурации, потому что:

  • У программы нет прав на запись в файл /etc/shadow;
  • Файловая система примонтирована в режиме только для чтения;
  • Повреждение файловой системы;
  • На диске нет свободного места;
  • Используется неверный модуль аутентификации;

А теперь давайте рассмотрим, как исправить каждую из этих проблем, чтобы убрать ошибку.

Как исправить «Authentication token manipulation error»

1. Права доступа

Ошибка в работе утилиты может возникнуть, если установлены неправильные полномочия на файл /etc/shadow, в котором хранятся пароли. Смотрим текущие полномочия командой:

ls -l /etc/shadow

У вас чтение и запись должны быть выставлены как на снимке, если это не так, выполните такую команду:

sudo chmod 0640 /etc/shadow

2. Файловая система только для чтения

Если вы загрузились в режиме восстановления Ubuntu или подобном режиме другого дистрибутива, то по умолчанию файловая система будет находиться в режиме только для чтения, соответственно утилита не сможет ничего записать. Чтобы перемонтировать её для записи, используйте:

sudo mount -o remount,rw /

3. Модули аутентификации

Ещё одной причиной может быть неправильная настройка модулей аутентификации, из-за которой утилита не может сохранить пароль. Доступные модули можно посмотреть командой:

ls /etc/pam.d/

Запустить обновление настроек модулей можно, выполнив от имени суперпользователя:

sudo pam-auth-update

На первом шаге надо нажать Ok:

Затем выбрать с помощью пробела и стрелок нужные модули, переключиться с помощью Tab на Ok и сохранить.

4. Свободное место на диске

Естественно, утилита не сможет изменить пароль, если на диске не будет свободного места. Убедитесь, что есть, как минимум, несколько сотен свободных мегабайт на корневом разделе. Это можно сделать с помощью команды:

df -h

А посмотреть, какие файлы занимают больше всего места, и удалить ненужное можно с помощью ncdu:

sudo ncdu /

Если утилита не установлена, то её можно установить с помощью пакетного менеджера. Название пакета такое же как и у команды:

sudo apt install ncdu

5. Ошибки файловой системы

Если файловая система была повреждена, то это тоже может стать причиной проблем с изменением пароля. Для проверки и восстановления файловой системы можно использоваться fsck. Но для работы утилиты файловая система должна быть отмонтирована.

fsck /dev/sda3

Здесь вместо /dev/sda3 необходимо указать адрес вашего раздела жёсткого диска.

6. Другие решения

Ещё многие советуют перезагрузить систему, возможно, это поможет:

sudo reboot

Также можно не изменять пароль, а сначала удалить старый такой командой:

sudo passwd -d имя_пользоватлея

А затем установить новый:

sudo passwd имя_пользователя

Выводы

В этой статье мы рассмотрели, как исправить ошибку «passwd: Authentication token manipulation error». Теперь вы знаете, что с ней делать, если она возникнет на вашем компьютере.

Creative Commons License

Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

Об авторе

Основатель и администратор сайта losst.ru, увлекаюсь открытым программным обеспечением и операционной системой Linux. В качестве основной ОС сейчас использую Ubuntu. Кроме Linux, интересуюсь всем, что связано с информационными технологиями и современной наукой.

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.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

I am logging in to my Ubuntu Server using my username. Once I am logged in I am typing passwd command. Entering a new password but a second after getting following error messages:

passwd: Authentication token manipulation error
passwd: password unchanged

What is wrong here? How can I change my password otherwise if I don’t have access to that server physically, i.e. I am connecting remotely with ssh using terminal.

Braiam's user avatar

Braiam

66.2k30 gold badges174 silver badges262 bronze badges

asked Aug 18, 2011 at 13:55

Bakhtiyor's user avatar

5

Do these two things just to make sure:

mount -o remount,rw /

This first part remounts the root partition as read/write since it was only in read mode. It actually dismounts the root partition and then mounts it again as read/write.

Then do this:

chmod 640 /etc/shadow

Then do the sudo passwd USER. It should work after that. This part gives the correct permissions to the shadow file.

slm's user avatar

slm

2,7761 gold badge25 silver badges32 bronze badges

answered Mar 30, 2012 at 20:02

Luis Alvarado's user avatar

Luis AlvaradoLuis Alvarado

206k165 gold badges539 silver badges704 bronze badges

7

If you insert the wrong passwd

$ passwd
Changing password for rinzwind.
(current) UNIX password: 
passwd: Authentication token manipulation error
passwd: password unchanged

you get this error. If you are sure that you inserted the correct one, this error might also show up if you are using shadowed password files and the shadow doesn’t have an entry for this user (basically/etc/passwd has an entry for this user, but /etc/shadow does not).

In order to fix this, you can either add the entry manually (make a backup first!!!) or recreate the shadow file with pwconv (Manpage).

You'reAGitForNotUsingGit's user avatar

answered Aug 18, 2011 at 14:09

Rinzwind's user avatar

RinzwindRinzwind

288k39 gold badges561 silver badges701 bronze badges

14

pam-auth-update

fixed my messed /etc/pam.d/common-password

A.B.'s user avatar

A.B.

87.7k21 gold badges242 silver badges317 bronze badges

answered Jun 5, 2015 at 14:50

jouell's user avatar

jouelljouell

2793 silver badges9 bronze badges

5

I’m not sure how it happened. A sudo user created my account then deleted it then created it again.

Here is what I found

mount -o remount,rw /
passwd
passwd: Authentication token manipulation error

No change.

sudo pwck

Showed no errors.

sudo grpck

Showed no errors.

ls -l /etc/passwd /etc/group /etc/shadow /etc/shadow-
-rw-r--r-- 1 root root    767 May  7 16:45 /etc/group
-rw-r--r-- 1 root root   1380 May  7 16:45 /etc/passwd
-rw-r----- 1 root shadow 1025 May  8 09:11 /etc/shadow
-rw------- 1 root root   1025 May  7 16:46 /etc/shadow-

Looks normal.

sudo cat /etc/shadow |grep oracle
oracle:$6$FsPqyplr$DrIvjFDSx0ipHmECMw1AU5hTrbNMnnkGRdFlaQcM.p3Rdu2OLjY20tzUTW61HlFH16cal56rKlLuW4j2mK9D.:15833:0:99999:7:::

Showed user and encrypted password.

sudo cat /etc/shadow- |grep oracle

Showed nothing. Not sure what that means but doesn’t look right.

sudo passwd -d oracle
passwd

So the solution was to delete the password then reset new password.

Hope this helps.

answered May 8, 2013 at 13:30

Bernard's user avatar

BernardBernard

3813 silver badges5 bronze badges

Another problem might be that the disk is full. I got this error when resetting a password, and later checked my disks with df and found that no space is available on my disk. After freeing some I could reset the password without problems.

answered Apr 14, 2014 at 10:14

erikbstack's user avatar

erikbstackerikbstack

2525 silver badges17 bronze badges

This issue occurred due to the incorrect permissions set to /usr/bin/passwd.

Please try to set the permission as 4511 by using the command:

chmod 4511 /usr/bin/passwd

This will resolve the issue.

Fabby's user avatar

Fabby

34.1k38 gold badges96 silver badges191 bronze badges

answered Sep 5, 2015 at 9:22

Murlo's user avatar

MurloMurlo

411 bronze badge

1

If you are using SELinux, running this command fixed the issue for me.

restorecon -v /etc/shadow

Thanks to this conversation for the solution.

Community's user avatar

answered Aug 23, 2014 at 6:39

sffc's user avatar

sffcsffc

2812 silver badges4 bronze badges

Check if you have messed up the common-password file in /etc/pam.d/.
This will cause errors if your present password does not match the one that common-password wants. In my case this was the reason why I was getting that authentication token error.

Fern Moss's user avatar

Fern Moss

8,5656 gold badges41 silver badges61 bronze badges

answered Nov 15, 2014 at 6:02

Revanth Kumar's user avatar

Also, ensure that your entry in /etc/passwd is not mal-formed. If you have the incorrect number of colons in the line for your user entry, the ‘passwd’ command cannot parse it and refuses to continue with the exact error message provided.

answered May 8, 2012 at 0:10

Magellan's user avatar

The error says that the PAM module (see: man pam_chauthtok) was unable to obtain the new authentication token. This may happen on Ubuntu when the user doesn’t have default password set yet and passwd is still requesting it, so the workaround is to change the password using root privileges, e.g.

sudo passwd $USER

so you won’t be asked for the current password and the error won’t happen.

See also: Authentication token manipulation error

Community's user avatar

answered Jul 18, 2016 at 1:09

kenorb's user avatar

kenorbkenorb

9,6362 gold badges74 silver badges88 bronze badges

0

The server I was working on was configured with some sort of Windows Authentication through PowerBroker Identity Server(PBIS).

Basically when I input sudo pam-auth-update, the following options appear:

Output of <code>sudo pam-auth-update</code>

  1. Unselect the first item of the list using the Space Bar Key to Select/Unselect, and Up/Down arrows if necessary.

  2. Then move to the Ok Option using Tab, and Left/Right arrow keys if necessary.

  3. Press Enter on top of the Ok Option.

  4. After this, I could use passwd and adduser as normal

  5. Once you are done with your user configuration, you can go back to sudo pam-auth-update, and leave the settings as before.

In the general case (i.e. not using the PowerBroker Identity Server(PBIS)), it seems to be important to have the Unix Authentication activated (and no other authentication system).

answered Mar 11, 2019 at 14:12

toto_tico's user avatar

toto_ticototo_tico

2551 gold badge4 silver badges11 bronze badges

Using the above info I found that this solved my problem

pam-auth-update

I need to remove extrausers option from pam.

In my logs I noted the following errros.

journalctl -f
passwd[16497]: pam_extrausers(passwd:chauthtok): user "xuser" does not exist in /var/lib/extrausers/passwd

answered Apr 7, 2017 at 9:13

nelaaro's user avatar

nelaaronelaaro

9,6185 gold badges34 silver badges42 bronze badges

In Lubuntu 15.04 I had the same token manipulation error. I figured this is due to the file system still in read only mode.

Using:

mount -o remount,rw /
passwd
passwd: Authentication token manipulation error

This does not work but this does:

mount -o remount, --rw /
passwd
passwd: Authentication token manipulation error

galoget's user avatar

galoget

2,9032 gold badges20 silver badges24 bronze badges

answered Nov 18, 2015 at 16:46

cecil toiletseat's user avatar

В Linux команда passwd используется для установки или изменения паролей учетных записей пользователей, в то время как при использовании этой команды иногда пользователи могут столкнуться с ошибкой: passwd: Authentication token manipulation error, как показано ниже.

Недавно я зашел на мой CentOS-сервер, используя мое имя пользователя tecmint. Как только я вошел в систему я пытаюсь изменить свой пароль с помощью утилиты passwd, но через секунду после получаю следующие сообщения об ошибках.

# su - tecmint
$ passwd tecmint
Changing password for user tecmint
Changing password for tecmint
(current) UNIX password: 
passwd: Authentication token manipulation error 

В этой статье мы расскажем о различных способах исправления ошибки в системах Linux.

1. Перезагрузка системы

Первым основным решением является перезагрузка системы.

Я не могу сказать, почему это сработало, но это сработало для меня на моем CentOS 7.

$ sudo reboot 

Если это не удается, попробуйте следующие решения.

2. Установите правильные настройки модуля PAM

Другой возможной причиной ошибки является неправильный параметр PAM (Pluggable Authentication Module).

Это делает модуль неспособным получить введенный новый токен аутентификации.

Различные параметры для PAM находятся в /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
....

Например, неверно сконфигурированный файл /etc/pam.d/common-password может привести к этой ошибке, и при запуске команды pam-auth-update с правами root можно исправить эту проблему.

$ sudo pam-auth-update

3. Перезапись раздела root

Вы также можете увидеть эту ошибку, если / partition установлен  только для чтения, что означает, что файл не может быть изменен, поэтому пароль пользователя не может быть установлен или изменен.

Чтобы исправить эту ошибку, необходимо установить корневой раздел как чтение / запись, как показано ниже:

$ sudo mount -o remount,rw /

4. Установите правильные разрешения в  файле shadow

Неправильные разрешения на файл /etc/shadow, который хранит фактические пароли для учетных записей пользователей в зашифрованном формате, также могут вызвать эту ошибку.

Чтобы проверить разрешения для этого файла, используйте следующую команду.

$ ls -l  /etc/shadow

Чтобы установить для него правильные разрешения, используйте команду chmod следующим образом.

$ sudo chmod 0640 /etc/shadow

5. Восстановление и исправление ошибок файловой системы.

Незначительные ошибки накопителя или файловой системы также могут вызвать ошибку.

Вы можете использовать инструменты для проверки диска Linux, такие как fsck, для исправления таких ошибок.

6. Освободите дисковое пространство

Кроме того, если ваш диск заполнен, вы не можете изменять какой-либо файл на диске, особенно когда размер файла должен увеличиваться.

Это также может привести к вышеуказанной ошибке.

In this article, we are going to see how to Fix “passwd: Authentication token manipulation error” in Linux. In a Linux system when you try to change your password you will come across Authentication Token Manipulation Error and what this means is, for some reason your password change was not successful at all.

There can be many reasons for that like if you don’t supply the password output will give you the information “No password supply” or if the password is mismatched output will give you the information “Sorry, passwords do not match” then in both the cases you will be getting Authentication Token Manipulation Error. Well in these cases you know what is causing the error right and you can simply fix it

But there are cases where you won’t see any information, and the output will be an Authentication token manipulation error

Let’s see the other cases and how to fix the error:

Method 1: Reboot System

Try rebooting the system it does work, and you won’t get the same error

$ sudo reboot

After rebooting the system try again it does fix the error.

Method 2: Set Correct Permissions on Shadow File.

In a Linux system, the /etc/shadow file keeps the password or stores the actual password for a user account in an encrypted format and this can be the reason behind the error. It can be fixed by setting the correct permission on it

To set the correct permissions on it, use the below chmod command.

$ sudo chmod 0640 /etc/shadow

How to Fix “passwd: Authentication token manipulation error” in Linux

Method 3: Remount Root Partition

If the partition is mounted as read-only as you will get the error that means no files can be modified, which means a user’s password can’t be changed, since you have to change the password you must mount the root partition as read/write 

The below command will do that and will fix the error:

$ sudo mount -o remount,rw /

How to Fix “passwd: Authentication token manipulation error” in Linux

Method 4: Clean the Disk Space

Sometimes, when your disk gets full then also creates an Authentication token manipulation error. So in this case we will clear all the space and try to log in again. There are some tools you can use to clean the disk space: Agedu, BleachBit.

Method 5: Repair the Filesystem file.

We can also use this technique to overcome this error, you can use disk cleaning space such as fsck tools.

Recently, I was changing password of a user in Linux when I encountered this ‘Authentication Token Manipulation Error’.

I used the usual passwd command to change the password and it threw me this error and password was not changed.

sudo passwd my_user_name
Changing password for user my_user_name
Changing password for my_user_name

(current) UNIX password: 
passwd: Authentication token manipulation error
passwd: password unchanged

Fixing Authentication Token Manipulation Error in Ubuntu

The ‘Authentication Token Manipulation Error’ simply means that for some reasons, the password change wasn’t successful.

There could be a number of reasons for that. In simple cases, you’ll see the root cause of the issue in the output itself. For example, if you didn’t supply a password, you should see it in the error:

No password supplied
passwd: Authentication token manipulation error
passwd: password unchanged

Similarly, if the password retype mismatched, it will show that info as well:

Sorry, passwords do not match
passwd: Authentication token manipulation error
passwd: password unchanged

That’s easy because you know what caused the issue and you can take a corrective action based on that. But you might not always be that lucky because in some cases, you won’t see any useful information, just the error.

Let’s see some of these cases and fix this issue.

Method 1

If you know the Linux directory structure, you know that the /etc/shadow directory keeps the password in encrypted format along with a few other information about users and their password.

This is why you should make sure that you have the permission to read and write on this file. Since you’ll be changing the password as the superuser, this file should have read and write permission for the root.

ls -l /etc/shadow
-rw-r----- 1 root shadow 1488 Oct 14 18:07 /etc/shadow

If that’s not the case, then you should set the correct permission:

sudo chmod 640 /etc/shadow

Method 2

The method 1 will work in most cases. But in my case, I had to remount root partition with read and write permission. I was trying to reset my admin password in Ubuntu actually.

mount -rw -o remount /

In some rare cases, your disk might be so full that you cannot make any changes to the /etc/shadow file. But if that’s the case, then you’ll be facing a lot of other issues as well.

Did it work for you?

I shared what worked for me and I can only hope that it worked for you as well. Did it? Which method worked for you? Do mention it in the comments.

Abhishek Prakash

Creator of Linux Handbook and It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries from Agatha Christie and Sherlock Holmes to Columbo & Ellery Queen.

I am trying to change a password for a user I am creating during the run of a dockerfile:

RUN groupadd --system ${UNAME} --gid ${UID} && 
    useradd --uid ${UID} --system --gid ${UNAME} --home-dir /home/${UNAME} --create-home --comment "Docker image user" ${UNAME} && 
    chown -R ${UNAME}:${UNAME} /home/${UNAME} && 
    usermod -aG sudo ${UNAME}

RUN echo '${UNAME}:password' | chpasswd

The second RUN command fails with

Authentication token manipulation error chpasswd: (line 1, user
${UNAME}) password not changed ```

Doing the very same like so, does work:

RUN useradd pi && 
    mkdir -p /home/pi && 
    chown pi /home/pi && 
    echo 'pi:password' | chpasswd

I don’t understand the difference. I just want to give ${UNAME} a constant password password.

asked Dec 15, 2021 at 10:37

Gulzar's user avatar

2

Make sure this is not because of the actual password used, as noted in moby/moby issue 5704.

In my case the password was too simple and needed to use a stronger one, using the capital and small letters, digits and symbols. For ex, P2sswrd!!!.

And add an echo "${UNAME}" to validate ${UNAME} has the expected value.

Finally, try

RUN echo "${UNAME}:password" | chpasswd
        ^^^               ^^^

Using "" will ensure the variable ${UNAME} is substituted by its value.

answered Dec 22, 2022 at 11:11

VonC's user avatar

VonCVonC

1.2m508 gold badges4248 silver badges5069 bronze badges

0

Понравилась статья? Поделить с друзьями:
  • Chkdsk на томе обнаружена одна или несколько неисправимых ошибок
  • Chkdsk коды ошибок
  • Chkdsk исправление ошибок файловой системы
  • Chkdsk возникла неопределенная ошибка 6e74667363686b2e 1729
  • Chkdsk возникла неопределенная ошибка 6e74667363686b2e 15bc