Storage Node installation resets local FOG user's password to something wrong.
-
Hey,
I’m about 99% certain that in r6241 the storage node portion of the installer on CentOS 7 resets the storage node’s FOG local user to something it’s not supposed to be.
We just updated one of our main servers and one of it’s storage nodes and then suddenly we were getting FTP login errors for the storage node when we tried to delete images.
I tried logging in manually via CLI and was getting the same authentication errors - when i reset the local FOG user’s password to what is inside the .fogsettings file for that storage node, I was able to log in manually, and image deleting started working again.
-
@Wayne-Workman Can you please see if the files /etc/passwd and /etc/shadow are actually changed when running the installer? Can you take a copy of those files, run the installer and then compare the files?
Edit: Can you please run this on your storage node and see what you get
useradd -s "/bin/bash" -d "/home/fog" fog && echo "YES"
If you see ‘YES’ it means that the command useradd returned fine although the user already exists. Just a wild guess. Maybe I am on the wrong path here.
-
@Sebastian-Roth So that command just checks to see if the user already exists or not? And it returning “YES” means… the command succeeded, even though the user might already have existed?
I’ll try to run it tomorrow and see what happens.
-
@Wayne-Workman Yes, from what I see in the script code it’s running useradd and checking the return value. This should not return YES if the user already exists. But maybe it does on your system?
-
[root@tafog ~]# useradd -s "/bin/bash" -d "/home/fog" fog && echo "YES" useradd: user 'fog' already exists [root@tafog ~]#
-
Well then I am on the wrong path. Can you try my other suggestion (backup shadow and passwd, then run the installer again)?
-
@Sebastian-Roth Yes, I’ll get that done.
I know the password, I can easily just set it back to the proper one if the installer changes it. And we have the almighty root account that we use for doing things on that server.
-
I learned what the issue is and have fixed it. While you may have to remove the erroneous entries in the fogsettings file, this should now be fixed and no more of the expression errors.