Welcome, Guest Login

Support Center

Unable to set encrypted password in Ubuntu 10.04 container using --userpasswd command

Last Updated: Sep 08, 2016 11:44AM UTC

Symptoms

It is impossible to set an encrypted user password via the vzctl set CTID --userpasswd username:password command in a Ubuntu 10.04 container. The command execution fails with the error below:
[root@myserver ~]# vzctl set 198801 --userpasswd 'root:$5$sa1tha5h$DGSCIw6vOMNRdrrTnnCHlZ5Nq8/Vyj/KR6ZxCNTX6E5' --crypted
chpasswd: invalid option -- 'e'
Usage: chpasswd [options]

Options:
  -h, --help                    display this help message and exit
  -S, --stdout                  report encrypted passwords to stdout
                                instead of changing the passwd file
Failed to change the password

Cause

The syntax for the chpasswd command has changed in Ubuntu 10.04, which causes an API call failure.

Resolution

The workaround for this issue is to set a plaintext password:
[root@myserver ~]# vzctl set 198801 --userpasswd 'root:myNewPassword'

The other workaround is to set the user password from inside the container:
[root@myserver ~]# vzctl enter 198801
entered into Container 198801
root@localhost:/# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Open a new case
















  • You can call our Support Team:

     +1 855-466-6670  Toll-free
     +1 425-689-7142  US
     +44 203-389-8331  UK
     +49 8914-379-4365  DE
     +7 499-609-2754  RU
e13d0138f9baaceff06b8753a609e5c0@virtuozzo.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete