Quick question about the tftp/ftp credentials
-
My fog server is on 1.5.9-RC2 (I will update to 1.5.9 soon) and according to the Web UI>FOG Config>FOG Settings>TFTP Settings, the user name was set to “fogproject” and a long hash password. When I tried to update a kernel, it threw the wrong credentials error. So after some internet digging, I found that I had to change or make sure the owner of /var/www/fog/service/ipxe/ was fogproject:www-data. After doing that using “chown -R fogproject:www-data /var/www/fog/service/ipxe/”, still got the same error. I then checked what password was in the TFTP settings menu and compared it to the Storage setting menu, and they were different. Set the Storage password to the one in TFTP settings, still failed, wrong credentials. So I changed “fogproject” to just “fog” and left the password the same. Changed the owner of that ipxe folder to “fog:www-data”, tried the kernel update and it succeeded. I never changed the credentials so I am wondering if it is possible they change during an update? I am not ruling out the possibility that one of my colleagues might have changed them accidentally. I will lock down the GUI just in case. I am up and running now. I think there was a power outage this weekend and noticed that the isc-dhcp-server service was not running. I had to use “sudo systemctl enable isc-dhcp-server.service” again as I did that a few weeks ago because of the same issue. I know that is more of an Ubuntu problem than a FOG problem but figured I’d mention it in case someone has some insight.
-
@brakcounty Please run
grep FTP_USERNAME /var/www/html/fog/lib/fog/config.class.php
and post output here. FOG used the account namefog
in earlier versions but with 1.5.9-RC2 you should be all setup with the account namedfogproject
really. -
@sebastian-roth said in Quick question about the tftp/ftp credentials:
grep FTP_USERNAME /var/www/html/fog/lib/fog/config.class.php
define(‘TFTP_FTP_USERNAME’, “fogproject”);
define(‘STORAGE_FTP_USERNAME’, “fogproject”)I just updated FOG to 1.5.9.45 and it changed the username back to fogproject. I went in and changed the user name to just “fog” again because that was what worked earlier today. Should I change it back to fogproject?
Also noticed that the kernel version rolled back to bzImage Version: 4.19.143. I need the latest kernel 5.6.18 because we have new laptops from Dell that need the latest kernel to get passed the FOG boot menu. As I tried to update the kernel I received this error:
Type: 2, File: /var/www/fog/lib/fog/fogftp.class.php, Line: 709, Message: ftp_put(): Could not create file., Host: 10.0.0.10, Username: fogLet me put the username back to fogproject and see what happens. What prompted me to change the username to “fog” was the end up an image capture, it was trying to login as fogproject and kept failing.
FOG Settings>TFTP Server setting shows this under TFTP PXE KERNEL DIR: /var/www/fog/service/ipxe. Should it be /var/www/html/fog/service/ipxe?running “sudo chown -R fog:www-data /var/www/fog/” fixed the kernel update error. Going to try an image capture/deploy to make sure everything else still works and will report.
-
@brakcounty As I said before, never versions of FOG use the
fogproject
account. The more you mess with things in a way we did not intend the more likely it will break and updating or re-running the FOG Installer might not be able to repair things for you.You might want to start here: https://forums.fogproject.org/topic/11203/resyncing-fog-s-service-account-password
As well I suggest you change back ownership to
fogproject
for/var/www/fog
and possibly/images
If you messed with that as well. -
@sebastian-roth I didn’t start messing with things until they stopped working, not the other way around. You suggested this path “/var/www/html/fog/lib/fog/” (and I have also seen this path elsewhere in other posts on this forum) when in fact the system seemed to be using “/var/www/fog/lib/fog/” so something must have changed during the upgrade from 1.5.6 to 1.5.7RC2 erroneously. I think it is the ownership of that path that caused the issue. Not sure how that happened, again, before I changed anything to troubleshoot. I read through that post and it does clear things up thanks. I will bookmark it.
-
@brakcounty Pleas run the following commands and post output here:
ls -al /var/www ls -al /var/www/fog ls -al /var/www/html grep FOG_VERSION /var/www/fog/lib/fog/system.class.php grep FOG_VERSION /var/www/html/fog/lib/fog/system.class.php
I guess what we have here is an install with two web directories.
-
@sebastian-roth said in Quick question about the tftp/ftp credentials:
grep FOG_VERSION /var/www/html/fog/lib/fog/system.class.php
Hello again. Sorry for the massive delay but I tried to update the kernel and got this error “Type: 2, File: /var/www/fog/lib/fog/fogftp.class.php, Line: 465, Message: ftp_login(): Login incorrect., Host: 10.0.0.10, Username: fog”. I noticed the config’s were using fog instead of fogproject. here is the output.
administrator@ncitimageserver:~$ ls -al /var/www total 24 drwxr-xr-x 5 root root 4096 Mar 17 13:57 . drwxr-xr-x 14 root root 4096 Mar 16 18:17 .. drwxr-xr-x 10 www-data www-data 4096 Mar 19 19:01 fog drwxr-xr-x 2 root root 4096 Mar 16 18:25 html -rw-r--r-- 1 www-data www-data 52 Mar 16 18:25 index.php drwxrwxrwx 2 fogproject root 4096 Mar 17 15:16 pm11_winpe administrator@ncitimageserver:~$ ls -al /var/www/fog/ total 408 drwxr-xr-x 10 www-data www-data 4096 Mar 19 19:01 . drwxr-xr-x 5 root root 4096 Mar 17 13:57 .. drwxr-xr-x 2 www-data www-data 4096 Mar 16 18:25 api drwxr-xr-x 2 www-data www-data 4096 Mar 16 18:25 client drwxr-xr-x 2 www-data www-data 4096 Mar 16 18:25 commons -rw-r--r-- 1 www-data www-data 370070 Mar 16 18:25 favicon.ico lrwxrwxrwx 1 www-data www-data 13 Mar 16 18:25 fog -> /var/www/fog/ drwxr-xr-x 2 www-data www-data 4096 Mar 16 18:25 fogdoc -rw-r--r-- 1 www-data www-data 572 Mar 16 18:25 index.php drwxr-xr-x 13 www-data www-data 4096 Mar 16 18:25 lib drwxr-xr-x 10 www-data www-data 4096 Mar 16 18:25 management drwxr-xr-x 3 www-data www-data 4096 Mar 16 18:25 service drwxr-xr-x 2 www-data www-data 4096 Mar 16 18:25 status
administrator@ncitimageserver:~$ ls -al /var/www/html/ total 20 drwxr-xr-x 2 root root 4096 Mar 16 18:25 . drwxr-xr-x 5 root root 4096 Mar 17 13:57 .. lrwxrwxrwx 1 root root 13 Mar 16 18:25 fog -> /var/www/fog/ -rw-r--r-- 1 root root 10918 Mar 16 18:17 index.html
administrator@ncitimageserver:~$ grep FOG_VERSION /var/www/fog/lib/fog/system.class.php define('FOG_VERSION', '1.5.9'); administrator@ncitimageserver:~$ grep FOG_VERSION /var/www/html/fog/lib/fog/system.class.php define('FOG_VERSION', '1.5.9'); administrator@ncitimageserver:~$
-
@brakcounty said in Quick question about the tftp/ftp credentials:
I noticed the config’s were using fog instead of fogproject.
So were you able to fix it all up? https://forums.fogproject.org/topic/11203/resyncing-fog-s-service-account-password
The output you posted from the commands requested look all good. Seems like you are on FOG 1.5.9 now as well, so the FOG installer has likely fixed a few things as well.
-
@Sebastian-Roth
The fog installer didn’t change the username in Storage and TFTP settings, it kept it as “fog”. I changed it to “fogproject” and set a password via sudo passw fog and put that password into the corresponding Storage and TFTP password fields as well as changing the username to fogproject. All is good now. Was able to update the kernel as well.The web ui login username is still fog and a password I set. Those credentials also apply when selecting deploy image from the ipxe menu. Don’t want to mess with that since it is working and I have staff that use those creds for imaging and I don’t want them to have admin access to the server. I have a question about restricting web ui access but that will be another thread.
-
@brakcounty said in Quick question about the tftp/ftp credentials:
The web ui login username is still fog and a password I set.
That is correct. Those are two different things. The web UI user has nothing to do with the
fogproject
service account (Linux).