Hi,
I'm trying to reset admin user web password and I'm getting the following error:
root@eve-ng:~# echo "INSERT INTO users VALUES ('admin',NULL,'root@eve-ng',-1,'Eve-NG Administrator','85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b',NULL,'','admin','',1);" | mysql --host=localhost --user=root --password=eve-ng eve_ng_db
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1062 (23000) at line 1: Duplicate entry 'admin' for key 'PRIMARY'
root@eve-ng:~#
Could you help?
Thanks,
bmorilla
Can't reset admin web password
Moderator: mike
-
- Posts: 7
- Joined: Sun Mar 19, 2017 11:35 pm
Re: Can't reset admin web password
root@eve-ng:~# ./evenginfo.sh
***** EVE-NG INFORMATION TOOL - CREATED BY R! ******
Mon Nov 13 14:01:32 EET 2017
***** EVE-NG VERSION INSTALLED *****
eve-ng 2.0.3-84
***** HOSTNAME INFORMATION *****
Static hostname: eve-ng
Virtualization: vmware
Operating System: Ubuntu 16.04.3 LTS
Kernel: Linux 4.9.40-eve-ng-ukms-2+
Architecture: x86-64
***** FILE SYSTEM DISK SPACE USAGE *****
Filesystem Size Used Avail Use% Mounted on
udev 2.9G 0 2.9G 0% /dev
tmpfs 597M 14M 584M 3% /run
/dev/mapper/eve--ng--vg-root 24G 7.9G 15G 36% /
tmpfs 3.0G 0 3.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup
/dev/sda1 472M 154M 294M 35% /boot
***** CPU INFORMATION *****
model name : Intel(R) Xeon(R) CPU E5504 @ 2.00GHz
***** FREE AND USED MEMORY *****
total used free shared buff/cache available
Mem: 5.8G 339M 5.0G 22M 516M 5.2G
Swap: 6.0G 0B 6.0G
***** INTERFACE INFORMATION *****
pnet0 8000.000c291d5e3c no eth0
pnet1 8000.000000000000 no
pnet2 8000.000000000000 no
pnet3 8000.000000000000 no
pnet4 8000.000000000000 no
pnet5 8000.000000000000 no
pnet6 8000.000000000000 no
pnet7 8000.000000000000 no
pnet8 8000.000000000000 no
pnet9 8000.000000000000 no
***** KVM CHECK INFORMATION *****
INFO: /dev/kvm exists
KVM acceleration can be used
***** APACHE STATUS *****
* apache2.service - LSB: Apache2 web server
Active: active (running) since Mon 2017-11-13 14:00:16 EET; 1min 16s ago
***** CHECKING INERNET STATUS *****
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=59 time=49.3 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 49.362/49.362/49.362/0.000 ms
***** EVE-NG INFORMATION TOOL - CREATED BY R! ******
Mon Nov 13 14:01:32 EET 2017
***** EVE-NG VERSION INSTALLED *****
eve-ng 2.0.3-84
***** HOSTNAME INFORMATION *****
Static hostname: eve-ng
Virtualization: vmware
Operating System: Ubuntu 16.04.3 LTS
Kernel: Linux 4.9.40-eve-ng-ukms-2+
Architecture: x86-64
***** FILE SYSTEM DISK SPACE USAGE *****
Filesystem Size Used Avail Use% Mounted on
udev 2.9G 0 2.9G 0% /dev
tmpfs 597M 14M 584M 3% /run
/dev/mapper/eve--ng--vg-root 24G 7.9G 15G 36% /
tmpfs 3.0G 0 3.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup
/dev/sda1 472M 154M 294M 35% /boot
***** CPU INFORMATION *****
model name : Intel(R) Xeon(R) CPU E5504 @ 2.00GHz
***** FREE AND USED MEMORY *****
total used free shared buff/cache available
Mem: 5.8G 339M 5.0G 22M 516M 5.2G
Swap: 6.0G 0B 6.0G
***** INTERFACE INFORMATION *****
pnet0 8000.000c291d5e3c no eth0
pnet1 8000.000000000000 no
pnet2 8000.000000000000 no
pnet3 8000.000000000000 no
pnet4 8000.000000000000 no
pnet5 8000.000000000000 no
pnet6 8000.000000000000 no
pnet7 8000.000000000000 no
pnet8 8000.000000000000 no
pnet9 8000.000000000000 no
***** KVM CHECK INFORMATION *****
INFO: /dev/kvm exists
KVM acceleration can be used
***** APACHE STATUS *****
* apache2.service - LSB: Apache2 web server
Active: active (running) since Mon 2017-11-13 14:00:16 EET; 1min 16s ago
***** CHECKING INERNET STATUS *****
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=59 time=49.3 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 49.362/49.362/49.362/0.000 ms
-
- Posts: 5180
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: Can't reset admin web password
updated
Q: How to Reset/Recovery Web admin access?
A: Type next 2 command lines in EVE CLI as Root user:
echo "DELETE from users where username = 'admin';" | mysql --host=localhost --user=root --password=eve-ng eve_ng_db
echo "INSERT INTO users VALUES ('admin',NULL,'root@localhost',-1,'Eve-NG Administrator','85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b',NULL,'','admin','',1);" | mysql --host=localhost --user=root --password=eve-ng eve_ng_db
This will add/restore "admin" account with password "eve" (without quotes)
Q: How to Reset/Recovery Web admin access?
A: Type next 2 command lines in EVE CLI as Root user:
echo "DELETE from users where username = 'admin';" | mysql --host=localhost --user=root --password=eve-ng eve_ng_db
echo "INSERT INTO users VALUES ('admin',NULL,'root@localhost',-1,'Eve-NG Administrator','85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b',NULL,'','admin','',1);" | mysql --host=localhost --user=root --password=eve-ng eve_ng_db
This will add/restore "admin" account with password "eve" (without quotes)