root password works in SSH, but not for WebUI


Recommended Posts

That is correct as the unRAID OS runs entirely  from RAM by setting up the entire Linux OS on a RAM disk.  The Linux password files are stored in that file system and NOT on the Flash Drive!  You should be able to log into the GUI using your 'old' password.  If not, you will have to delete both the passwd and the shadow files in the config directory and (probably) reboot you server.  You will now to be able to login using root with no password will be required. Then set your password to whatever you want from the GUI and always use the GUI to make the change in the future.  (unRAID is now designed to be administer from the GUI and not the command line...) 

Link to comment
14 hours ago, Frank1940 said:

That is correct as the unRAID OS runs entirely  from RAM by setting up the entire Linux OS on a RAM disk.  The Linux password files are stored in that file system and NOT on the Flash Drive!  You should be able to log into the GUI using your 'old' password.  If not, you will have to delete both the passwd and the shadow files in the config directory and (probably) reboot you server.  You will now to be able to login using root with no password will be required. Then set your password to whatever you want from the GUI and always use the GUI to make the change in the future.  (unRAID is now designed to be administer from the GUI and not the command line...) 

 

Thanks @Frank1940 - the odd thing is I did change my password via WebGUI to begin with ... and now it won't let me log in with new or old password. The new password will work when I connect via SSH.

 

If I delete passwd and shadow files will that reset all of my user passwords as well?

Link to comment

Probably...  Specially if it a Linux user password.     I also see a file named smbpasswd  in the config folder and it may contain passwords for that function.  

 

One thing to try is to clear you browser cache.  You may also have to reboot the server to get everything back in sync. 

 

In your case, I am wondering if you might have a problem with your Flash Drive.  (The fact that the GUI changed it for the command line--- as it should---  and not for the GUI.)  You can check this in a Windows machine with chkdsk (Apple has an equivalent function).  You can get a clean shutdown of your server a one second push of the power button.  DON'T hold it down for much longer as that will force an unclean shutdown! 

 

By the way, do you have a backup of your Flash Drive?  If not, copy the contents of the entire drive to a folder somewhere besides on the server.  If you are doing this while the server is running, stop the array first.  This sets a flag that the array was stopped so that parity will not be checked when the server is started up if you have to use the backup to rebuilt the Flash Drive. 

Link to comment

@autumnwalker There is another user also that was locked out of the webui after setting a password. He used a password generator so might be a bug with a special character used. 

Might be good to try @Frank1940 suggestion to delete the password files and set the password again using a simple one without any special characters. Just for a test.

Link to comment
3 hours ago, saarg said:

@autumnwalker There is another user also that was locked out of the webui after setting a password. He used a password generator so might be a bug with a special character used.

 

This is my exact use case - password generated via generator with symbols.

 

What Tom found is that a ? character in certain positions will not be recognized by the WebGUI login. Fix is to login via Telnet / SSH as root, change password via passwd to something without the offending characters, log into WebGUI using the new password, change password for root again via WebGUI - that will get things sync'd on the flash drive.

Link to comment

According to Wikipedia:

....there are 14 metacharacters .....   the open/close square brackets, "[" and "]"; the backslash "\"; the caret "^"; the dollar sign "$"; the period or dot "."; the vertical bar or pipe symbol "|"; the question mark "?"; the asterisk "*"; the plus-sign "+"; open/close curly braces, "{" and "}"; and open/close parenthesis, "(" and ")".

 

It would probably be wise to not use any of these characters in a password that you want to use through the GUI.  Undoubtedly some of them are usable but it is probably better to just easier to avoid them altogether for any unRAID password.

Link to comment

As you pointed out, this issue did come up at some point in the past.  And my memory is failing me as  to exactly what was done to 'fix' the issue.  It could be one of the whack-a-mole types of solution where one portion of the problem is addressed but the underlying issue is not.  I agree with you that this should not be allowed to happen. 

 

Hopefully, your password manager will allow you to 'see' the password that it generated.  If it does have a look at it and see if you can figure out if this is the issue and which is/are the offending character(s).  If that is the case, I would suggest that you generate a new thread in the Defect Reports  sub-forum detailing exactly what you found. 

 

Link to comment
  • 3 years later...

I have the opposite problem. I can login via the WebUI with my password but it won't let me login with that password via SSH from its Terminal (if I do ssh root@localhost).

root@Tower:~# ssh localhost
root@localhost's password: 
Permission denied, please try again.

I recently setup passwordless SSH and added my key to /root/.ssh/authorized_keys. Althought I can SSH remotely without a password, I still get asked for a password if I try to set up a ssh tunnel from a remote PC like this:

 

$sudo ssh -fNL 127.0.0.2:58846:localhost:58846 <unraid-ip>
The authenticity of host '<unraid-ip> (<unraid-ip>)' can't be established.
RSA key fingerprint is SHA256:xxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '<unraid-ip>' (RSA) to the list of known hosts.
root@<unraid-ip>'s password:
Permission denied, please try again.

 

I don't know what else to do.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.