I can not access to frontend web. Invalid username or password

I have tried in Centos 7 and Ubuntu 14.

I edited : /var/lib/one/.one/one_auth with: oneadmin:opennebula.

And I have tried by commands:
oneuser list
[UserPoolInfo] User couldn’t be authenticated, aborting call.

oneuser passwd oneadmin opennebula
OpenNebula USER name not found, use the ID instead
command passwd: argument 0 must be one of userid

oneuser create oneadmin opennebula
[UserAllocate] User couldn’t be authenticated, aborting call.

Hi,

You must set the password before first run of the opennebula service (oned).

After first run you must use the oneuser tool to change the password. In your case this forum topic could help.

Kind Regards,
Anton Todorov

Please, can you write me all of the secuence of commands for change the password. I can,t understand the reference topic

Hi,

Please post the contet below:

  1. In front node:
    root@front1~ # su - oneadmin
    root@front1~ # cat ~/.ssh/config
    root@front1~ # ls -l ~/.ssh/config
    root@front1~ # ls -l /var/lib/one/.one/one_auth
    root@front1~ # cat /var/lib/one/.one/one_auth
    oneadmin@front1~ $ cat ~/.ssh/authorization_keys

https://forum.opennebula.io/t/lost-oneadmin-password/2342/2?u=snbanerjee

Here is my snippet to reset the password with sqlite3 as DB backend:

#!/bin/bash

systemctl stop opennebula

one_pass="ThePassword"
one_auth="$(echo -n $one_pass | openssl sha1)"
one_auth="${one_auth##*[[:space:]]}"
one_xml="$(sqlite3 ~oneadmin/one.db "select body from user_pool where name='oneadmin';")"
one_xml_new="$(echo "$one_xml" | sed -e "s|<PASSWORD>.*</PASSWORD>|<PASSWORD>$one_auth</PASSWORD>|")"
cp ~oneadmin/one.db ~oneadmin/one.db.orig
sqlite3 ~oneadmin/one.db "update user_pool set body='$one_xml_new' where name='oneadmin';"
sed -i -e "s|oneadmin:.*|oneadmin:$one_pass|" ~oneadmin/.one/one_auth

systemctl start opennebula

Kind Regards,
Anton Todorov

1 Like

Hi, I still can not enter in the frontend web sunstone

[oneadmin@opennebula52 ~]$ cat ~/.ssh/config
cat: /var/lib/one/.ssh/config: No existe el fichero o el directorio
[oneadmin@opennebula52 ~]$ ls -l ~/.ssh/config
ls: no se puede acceder a /var/lib/one/.ssh/config: No existe el fichero o el directorio
[oneadmin@opennebula52 ~]$ ls -l /var/lib/one/.one/one_auth
-rw-r–r-- 1 oneadmin oneadmin 42 mar 30 09:13 /var/lib/one/.one/one_auth
[oneadmin@opennebula52 ~]$ cat /var/lib/one/.one/one_auth
oneadmin:3155c7ac9d1c4814f67c2412370e8559
[oneadmin@opennebula52 ~]$ cat ~/.ssh/authorization_keys
cat: /var/lib/one/.ssh/authorization_keys: No existe el fichero o el directorio

OK,
Running the script worked fine