Authentication token manipulation error raspberry pi
I’ve been playing around with my pi for a couple of days. I changed the default password (or so i thought) and everything went fine except if i restarted the x server. Then the login window refused my password and i was forced to restart my pi so the autologin could do the job.
Now i’ve stopped autostarting xfce and when i get to the login prompt, i have the same problem.
I’m using wheezy and i’ve read a lot of similar password issues, but none of solutions proposed has worked for me.
Neither default pi/raspberry login nor the pass i chose work for me (i think this last one is caused because i used ‘sudo psswrd’ instead of just ‘psswrd’, so the pass was temporal — or so i’ve read).
Has anyone had the same problem?. I can’t log to the pi so i’m trapped with this issue. Any help would be much appreciated.
Re: Password issues
Do you have access to another Linux PC? Or maybe you can put a Ubuntu live CD into a Windows PC.
In this case, you can edit the contents of the RPi SD card. The file /etc/inittab controls the bootup sequence. Look at page 3 of the July edition of the MagPi magazine for instructions of how to bypass the password request during startup.
www.themagpi.com
This will allow you to boot up your RPi. Then reset your password using the command
passwd
Re: Password issues
«sudo passwd» would have only changed the password for root not for PI.
Have you tried all password combinations possible there must be something that works??
Fixing this problem without the ability to login as root is not going to be easy however you only need to mount the SD Card with another copy of Linux and edit (sdcard)/etc/shadow
Locate pi and root then change their lines to:
root:*:15540:0:99999:7.
pi:$6$gxqrzdO6$eduJhvI9vWXOW1z52NJ9CCt9SBsM2GAFnF.03aGQQ7rDwG.A0wKESCUVAYnLpSxh9FD4EYre1vUWEOXra0XmE1:15540:0:99999:7.
This removes the password set for root it should also restore the password for pi to raspberry
There are programs which can crack shadow passwords but they require a lot of time and brute force so patching it with a known password is the faster option.
I assume you’re using Raspbian Wheezy as your distro if not then these instructions won’t work.
Ubuntu Server Raspberry Pi 4 Image: Cannot login using default credentials “authentication token manipulation error”
So you just loaded up Ubuntu Server on your Raspberry Pi 4 using the latest Ubuntu Server Pi image and when you try logging in with the default username and password of ubuntu:ubuntu, you get the error “Authentication token Manipulation error” when you try to change the default password and log in.
This occurs on a fresh image write to an SD card using the Ubuntu 18.04.4 LTS 64-bit image. This may occur on other images and other versions of Ubuntu and other versions of the Raspberry Pi.
The filename for the image with the issue is:
How to Fix
After doing some research, I found out that there was an issue with a password file or the PAM database on the image. I figured that it was best to try to log in first using the default credentials, and then we can worry about changing the password later.
To do this I decided to modify the “cloud-init” scripts. I mounted the SD-Card on another Linux system, opened the “/boot/firmware/user-data”, and changed the “expire” setting on the ubuntu user from true to false.
The Instructions
- Mount the SD-Card on another Linux system.
- Navigate to the boot filesystem, and then open the “user-data” file inside of the firmware directory using nano or vi. The full path on the SD-Card is:
- Scroll down to this section.
Change the “expire: true” to “expire: false”.
You should now be able to log in using the username ubuntu and password ubuntu without being asked to change your password, and without seeing the error.
Once you have logged in, change the password to this account by using “passwd”.
FIX: Authentication token manipulation error on Raspberry Pi
- The only way to fix an authentication token manipulation error on Raspberry Pi is by tweaking the files of the installed image.
- In this article, we are going to show you two ways to do it.
- The article is part of a more extensive list of materials dedicated to Raspberry Pi Errors, so you should check it out.
- You can read useful information in the Developer Tools section on the website.
Oftentimes we forget or misspell login passwords we use for various accounts and there’s usually a method to recover them. But what if the system won’t accept the default credentials?
This can be the case with Raspberry Pi users. Sometimes, at the first login, the system won’t recognize the default passwords (eg. pi, for Linux OS, or ubuntu, for Ubuntu OS).
The common error message is Authentication token manipulation error. The only successful solution reported by the Raspberry community members is to tweak the password file in the image.
You will need another machine that runs on Windows, Mac, or Linux, where you can insert the SD card.
How do I fix authentication token manipulation error? 
1. Modify the password file for Linux OS
- Insert the SD card in another device
- The card should contain a file named cmdline.txt
- Open it in Notepad (or other .txt file reader)
- Edit the text to have init=/bin/sh at the end. It should look like this:
- dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=04ceb741-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait init=/bin/sh
- Save and exit > Insert the SD card into the Raspberry Pi
- When prompted type: mount -o remount, rw / (and repeat if an error message appears)
- Type passwd pi
- Type the new password
- Then type sync
- Type exec /sbin/init
- Safe exit Raspberry Pi
Then put the card into the PC again and delete the init=/bin/sh combination you added. Save the changes and insert the card into the Raspberry Pi. You should be able to use the new password.
Modify the password file for Ubuntu
- Insert the SD card in another device
- Look for the firmware directory >user-data file (in YAML format).
- Look for the following line: chpasswd: expire: true
- Change to expire: false
- Save and exit.
Insert the SD card into the Raspberry Pi and you should be able to log in using the ubuntu username and password.
We hope that one of these solutions was helpful. If you have any suggestions related to this topic, please leave a comment in the dedicated section below.
- Download this PC Repair Tool rated Great on TrustPilot.com (download starts on this page).
- Click Start Scan to find Windows issues that could be causing PC problems.
- Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).
Restoro has been downloaded by 0 readers this month.
Ошибка 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». Теперь вы знаете, что с ней делать, если она возникнет на вашем компьютере.
Как исправить ошибку “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. Освободите дисковое пространство
Кроме того, если ваш диск заполнен, вы не можете изменять какой-либо файл на диске, особенно когда размер файла должен увеличиваться.
Это также может привести к вышеуказанной ошибке.