2

I am trying to set the root password on Amazon EC2 (CentOS machine). When I try passwd, I get this:

[root@domU-11-33-39-00-85-21 ~]# passwd
Changing password for user root.
passwd: Authentication token manipulation error

What can I do to fix this? I know ssh is better but I need to set the password because I require it to login to my webmin.

Contents of /etc/nsswitch.conf:

passwd:     files
shadow:     files
group:      files

#hosts:     db files nisplus nis dns
hosts:      files dns

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus

When I tried passwd -d root and then passwd, I got to reset the password but I can't login using this password.

2
  • Could you please add a content of /etc/nsswitch.conf from that system.
    – Alex
    Feb 8, 2011 at 15:42
  • Permissions on /etc/passwd and /etc/shadow are ok? Anything in /var/log/messages or /var/log/secure ? Any selinux audit errors? PAM configuration ok (/etc/pam.d) ? If possible set the root pw to a 20-character random string and do root via sudo, all auth via ssh public keys. (don't know if webmin can do this)
    – AndreasM
    Jul 12, 2011 at 6:31

1 Answer 1

2

To change root password of you CentOS in EC2 with webmin installed in it use the following command after login with your ssh.

/usr/libexec/webmin/changepass.pl /etc/webmin root <yourpassword>

after changing the password you can login with new root password in webmin ofcourse you can nomally login with your ssh and private keys as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .