Jump to content

Recommended Posts

Posted

Rather than tagging this to my thread about WDS and FOG i thought id make a new post as it was more of a specific question.

 

I've got FOG up and running fine theres just one thing thats got me stumped. On the clients when they boot and you get the Menu where you can select "Quick Image" it asks for a password. Now ive tried every password i can think of that would be associated and looked through FOG configuration of where this password is set and cannot find anything.

 

Can someone tell me either what the password usually is and/or how you can change this as id also like to know if you can add/remove password protect options on this boot menu as i can see kids messing about running memtest and the registration procedures as they dont seem to be passworded.

Posted

from memory, load up the management interface, fog settings (top of screen), pxe boot menu (left of screen)

 

i've found this section a little flakey on occasion occasional getting a TFTP error when setting the passwords, but normally a long delay and a success message, or just instant success. Part of the problem for me may be that i'm running behind a proxy so parts of the management interface don't work properly causing delays when i click on menu items.

 

The general advice when having password issues seems to be to set everything to the same password intially. There actually of lot of places where passwords need to be reset if you do this:

 

fog user account on the operating system

fog user for management interface

storage node password

pxe boot menu

 

there are also the .php configuration files, one for general config, and i think a seperate one for multicast settings.

 

...i think anyway, it's been a while since i moved it to a new server and had to find them all.

Posted

thanks for that, i couldnt find that PXE menu section until you mentioned where it was.

 

I've come accross another problem though, when i use the Quick Image function, i enter my password everything kicks in fine until just before the ghosting process is about to start i get this big garbled error message to do with mysql.

 

Its a big chunk but the main points that stick out are;

 

"Access denied for user 'www-data '@' localhost' (using password: NO)

 

and then later down;

 

"A link to the server could not be established in /var/www/fog/service/host lookupbymac.php on line 27"

"Enter a valid FOG username and password"

 

In my user accounts in the FOG managment window ive got an account called fog - password which doesnt work and even made one called test- test which again doesnt work, at the 3rd try of a username and password it just reboots.

 

Any ideas?

Posted
Have you set the passwords in the fog settings under other information? I had same error untill all passwords were the same and correctly put in the right places.
Posted
there is only 1 other password ive set in fog and that doesnt work either. Altho saying that i swear the passwords i was trying to set on the PXE boot menu were not working and all of a sudden started working later in the day when i tried again.
Posted
i should make it clear i can ghost up and down fine by using scheduled tasks, just only get this prompt for a username and password when i use the quick image option on the pxe boot menu.
Posted

To answer the question, a quote from FOG forum:

 

Fog forum

This is intentional, we disabled any feature on the boot menu that could be destructive to the client computer. You must regenerate the pxe menu via -> other information -> pxe boot menu in order to get into those options.

Posted

it seems there is no current file by the same name, only a "lookupbymac.php"

 

but before i even worry about that it appears i cant just copy and paste the new file into the folder, "Access Denied" so how do i get the damn thing in there! grr this is where my lack of linux skills becomes painfully obvious :(

Posted

Yeah i had the same problem witrh the quick image, the patch does fix it, but i couldn't get it to install either. I just manually edited the files, it's only two lines you need to change i think.

 

You don't just replace the file though, the patch is designed to modify not replace.

 

I'll see if i can find what i changed...

Posted
it seems there is no current file by the same name, only a "lookupbymac.php"

 

noticed the same thing, it was the correct patch though as it fixed the problem.

Posted
ok so i figured out how to paste the file into the folder but nothing changed, so im obviously doing something wrong so if you could let me know how you did it that would be great!
Posted
i renamed the original to .old, pasted in your version and still didnt work, even rebooted everything and still same message arghhhhhh!
Posted

im opening up a terminal and tried typing;

 

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 restart

 

and i just get "command not found" although if i browse to that location apache2 is there so im not sure what im doing wrong there.

 

But surely does restarting Ubuntu not restart apache2 anyway?

Posted

Yes, a reboot restarts it. Are you using version FOG 0.26?

 

Just to double check, the replacement file should have these changes?

Highlighted in bold hopefully.

 

/*
*  FOG - Free, Open-Source Ghost is a computer imaging solution.
*  Copyright (C) 2007  Chuck Syperski & Jian Zhang
*
*   This program is free software: you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation, either version 3 of the License, or
*   any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*
*   You should have received a copy of the GNU General Public License
*   along with this program.  If not, see .
*
*
*/

@error_reporting(0);
require_once( "../commons/config.php" );
require_once( "../commons/functions.include.php" );
require_once( "../management/lib/ImageMember.class.php" );

[b]$mac = $_POST["mac"];[/b]

if ( isset($mac) )
{
$conn = @mysql_connect( MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD);
if ( $conn )
{
	if ( ! @mysql_select_db( MYSQL_DATABASE, $conn ) ) die( "#!db" );
	if ( isValidMACAddress( $mac ) )
	{
		if ( $_POST["username"] != null && $_POST["password"] != null )
		{
			$u = mysql_real_escape_string(base64_decode(trim($_POST["username"])));
			$p = mysql_real_escape_string(base64_decode(trim($_POST["password"])));
			
			
			
			 $sql = "select * from users where uName = '$u' and uPass = MD5('$p')";
			 $res = mysql_query( $sql, $conn ) or die( mysql_error() );
			 if ( mysql_num_rows( $res ) == 1 )
			 {
			 	$blFound = false;
			 	while( $ar = mysql_fetch_array( $res ) )
				{
					$blFound = true;
				}
				
				$hid = getHostID( $conn, $mac );
				if ( $hid != null )
				{
					$imageMember = getImageMemberFromHostID( $conn, $hid );
					if ( $imageMember != null )
					{
						$tmp;
						if( createImagePackage($conn, $imageMember, "", $tmp, false ) )
						{
							echo "#!ok";
						}
						else
						{
							echo "    $tmp";
						}
				
					}
					else
						echo "#ih";				
				}
				else
					echo "#ih";
			 }
			 else
			 {
			 	echo ( "#!il" );
			 }				
		}
		else
		{
			[b]$mac = mysql_real_escape_string( $mac );[/b]
			$sql = "select * from hosts left outer join images on ( hostImage = imageID ) where hostMAC = '" .  $mac . "'";
			$res = mysql_query( $sql, $conn ) or die( "#!db" );
			if( $ar = mysql_fetch_array( $res ) )
			{
				if ( isSafeHostName( $ar["hostName"] ) )
				{
					echo "  Host: " . $ar["hostName"] . "\\n";					
					echo "  Image: " . $ar["imageName"] . "\\n";	
				}	
				else
					echo "#!ih";
				exit;
			}
			echo "#!nf";
		}
	}
	else
	{
		echo "#!im";
	}
}
else
{
	die( "#!db" );
}
}
else
echo "#!im";
?>

Posted

yep fog 0.26 and the lines in bold are in my version however...

 

when i look at the file it has an icon next to it which ive found out means "no read" although im not really sure what that means exactly but have i somehow managed to balls up the way of pasting the file into the folder and that could be causing it?

Posted

I don't have the GUI installed, but in a console window type

 

ls -l

 

and it should display the file ownership and permissions.

 

You should be able to set the ownership and permissions through the GUI or by using chown and chmod.

 

 

Or if you wanted to try another way, switch the files back so the 'old' file is the one being used again, then just make the changes in bold to update it, that should eliminate permissions as a problems as it's the original file.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...