56

I am trying to change root password in my Ubuntu system.

This is what I did:

ashot@ashot-desktop:~$ sudo passwd root 
passwd: Authentication token manipulation error 
passwd: password unchanged

How do I change root password in Ubuntu?

Eric Leschinski
  • 2,221
  • 1
  • 20
  • 24
Ashot
  • 661

5 Answers5

71

Usually there is no need to set a root password. See: https://help.ubuntu.com/community/RootSudo

To set or change your (root) password:

sudo -i
passwd

To lock it again

sudo passwd -dl root
Panther
  • 102,067
  • 1
    The relevant parts from the link: "By default, ... you cannot login as root directly or use the su command to become the root user. However, since the root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in ... Just remember, when sudo asks for a password, it needs YOUR USER password, and not the root account password. ... Enabling the root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo." (Then the page goes on to tell how to enable the root.) – Evgeni Sergeev Jan 05 '17 at 04:56
  • To lock the password, see man passwd: d is delete and l is lock. – Timo May 28 '21 at 07:11
16

When you use sudo your already accessing root you don't have to specify root.

sudo passwd

If your trying to do this from recovery root you should:

mount -rw -o remount / 
passwd
heemayl
  • 91,753
Nade
  • 331
  • 2
  • 11
5

If 'ashot' is your root account, don't call 'sudo passwd'. I've been doing that for the past few months and it wouldn't change my password.

To change my password, I had to call 'passwd' without 'sudo'. Otherwise, the password modification is not taken account of.

Michael Fayad
  • 241
  • 5
  • 10
0

I installed a .deb file which created for pardus, when i install this package to ubuntu, my ubuntu is gone, i had never been super user also couldn't use passwd to change password.
I got the same error :

passwd: Authentication token manipulation error 
passwd: password unchanged


Try this steps;

- restart ubuntu, open it recovery mode
- drop root
- upgrade your ubuntu to a new version

This solved my problem, i hope it helps you too.

0

Possibly /etc/passwd and /etc/shadow don't match.

Try to use command pwconv.

heemayl
  • 91,753
Pavel
  • 1,456