Odd issue: Cannot login from webgui but can ssh as another user

barny

Dabbler
Joined
Feb 4, 2015
Messages
15
Hi all,
I didn't find anything like this in the forums or the web so I am posting it here.
I have been using Truenas 12 (freenas before that) for years with no issues.
I have a nextcloud VM, Pihole VM, and SMB shares all working and accessible by their respective ip's.
Today I can't login from webgui. Webpage login shows but user-root and password not accepted. I can login by ssh as another user with sudo privileges.
I tried changing the root password by ssh to no avail on the webgui.
Tried restarting the nginx service.
Rebooted the truenas server 3 times - no avail.
Everything comes back up just fine but not able to login from the webgui page.
Cleared the firefox cache - no luck.
Used Brave- no luck.
I sure don't want to reinstall this thing. It has been working great for a long time.
Any thoughts? Thanks in advance.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try the console menu to reset root's password.
 

barny

Dabbler
Joined
Feb 4, 2015
Messages
15
Thanks Mr. Tai,
Gads, what a head slap! :smile:
Ran /etc/netcli option 7 - bingo!
Never had to do that for the entire time I have run this thing.
Any ideas as to what may have happened?
Thanks again!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Any ideas as to what may have happened?

You probably changed root's password from the shell using the usual Unix mechanisms at some point, not realizing this wouldn't change root's password in the configuration database. There are 3 ways to change root's password that will update the configuration database:
  1. Change it in the UI via Accounts->Users.
  2. Change it via the console menu
  3. Change it via API calls in shell, i.e., midclt call user.set_root_password "<new root password>"
 

barny

Dabbler
Joined
Feb 4, 2015
Messages
15
Thanks again Mr. Tai,
Thanks again for your patience and input on possible issues for my own understanding.
I rarely even look at the server from the webgui as everything in Truenas core works so well. It has been so stable for several years.
Kudos to the TrueNAS Team!
 
Top