Hostname Changer Access Denied, Code = 5
-
Hi all,
I’m trying to set up different groups in FOG so that the systems belonging to them are put in different OUs. However, I’m running into the issue at the moment where the FOG log is saying: “Hostname changer access denied, code =5”. I have seen this code before when there are old AD accounts still lurking about, but I’ve just deleted the AD account that used to belong to my test VM, and I’m certain the way I’ve configured it through the FOG GUI is wrong.
I’ve attached a screenshot of my current settings below. If someone could help me get this working, it would very much be appreciated. -
@robtitian16 Check this for errors in the client: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx
code 5 is just a general ‘access denied’. My guess: bad username/pass
-
@wayne-workman It works perfectly fine for the adding of systems to the domain without setting a default OU, so it cannot be a bad username or password issue. It is definitely related to the LDAP format I’m using.
I have also tried: “ou=Computers,ou=CompanyName UK,dc=CompanyName,dc=co,dc=uk” with no further joy. -
@wayne-workman Actually, it does work now: it was a trailing space as the end of the LDAP format that was causing the issue.
However, now when updating the different groups with the AD details and what snapins they should include, upon pressing ‘Update’ on the page it says it’s updated, but when I go back to check the details the fields are blank. -
@robtitian16 said in Hostname Changer Access Denied, Code = 5:
when updating the different groups with the AD details and what snapins they should include, upon pressing ‘Update’ on the page it says it’s updated, but when I go back to check the details the fields are blank.
What version of fog are you on?
-
Running Version 1.5.0-RC-10
SVN Revision: 6080
Jan 17, 2018 15:48 pmI’ll try updating tomorrow and see if that resolves the issue.
-
@robtitian16 said in Hostname Changer Access Denied, Code = 5:
I’ll try updating tomorrow and see if that resolves the issue.
Ok. If it’s still broke after that, I’ll try to replicate.
-
@wayne-workman I have updated, though I wasn’t prompted when connecting to the FOG web GUI to update the database. It’s still showing that my FOG version is the same as well.
-
@robtitian16 Do me a favor - open two tabs in your browser. One on the host’s Active Directory tab, one on the Apache error log viewer. The log viewer is somewhere in
web gui -> FOG Configuration -> log viewer or something
Try to update the OU field as you did before, then immediately look at the Apache error log for any errors. -
@wayne-workman I get the following:
[Thu Jan 18 15:08:27.427489 2018] [php7:error] [pid 8958] [client 10.1.2.88:49534] PHP Fatal error: Uncaught Error: Call to a member function isValid() on null in /var/www/html/fog/lib/fog/host.class.php:778\nStack trace:\n#0 /var/www/html/fog/lib/fog/host.class.php(792): Host->_setAlo()\n#1 /var/www/html/fog/lib/client/autologout.class.php(43): Host->getAlo()\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3094): Autologout->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct()\n#10 /var/www/html/fog/lib/fog/fogbase.class.php(481): ReflectionClass->newInstanceArgs(Array)\n#11 /var/www/html/fog/manageme in /var/www/html/fog/lib/fog/host.class.php on line 778 [Thu Jan 18 15:06:26.192618 2018] [php7:error] [pid 10510] [client 10.1.2.88:49532] PHP Fatal error: Uncaught Error: Call to a member function isValid() on null in /var/www/html/fog/lib/fog/host.class.php:778\nStack trace:\n#0 /var/www/html/fog/lib/fog/host.class.php(792): Host->_setAlo()\n#1 /var/www/html/fog/lib/client/autologout.class.php(43): Host->getAlo()\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3094): Autologout->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct()\n#10 /var/www/html/fog/lib/fog/fogbase.class.php(481): ReflectionClass->newInstanceArgs(Array)\n#11 /var/www/html/fog/manageme in /var/www/html/fog/lib/fog/host.class.php on line 778
Strangely, the first group I made (well over a year ago) is perfectly fine; it’s all the groups I created the other day that are having the issue.
-
@robtitian16 said in Hostname Changer Access Denied, Code = 5:
it’s all the groups I created the other day
To clarify, are you trying to set the OU on individual hosts, or via groups?
-
@wayne-workman Groups, not hosts.
-
At this point, it’s very likely this is a bug, so moved this to bug reports.
-
Is the password typed into (Domain Password (will auto-encrypt plaintext)) actually plaintext for the “real” password of the AD Username?
I say this because the access denied REALLY seems to indicate a problem with the password.
The error logs have nothing to do with Active Directory and should pose little issue.
-
@tom-elliott That part is actually resolved now. This was raised as a bug because not all of the groups are updating with the correct AD details. It’s only worked for one, which was the very first group I created. Now whenever I save the AD details and reload the page, it’s as if it never saved in the first place.
Let me know if you need anymore details/logs. -
@Tom-Elliott the OU field isn’t saving via groups. He’s on 1.5.0-RC-10
-
@robtitian16 I’m very confused. What error, exactly, is this thread focusing on?
-
@tom-elliott From the post above: “However, now when updating the different groups with the AD details and what snapins they should include, upon pressing ‘Update’ on the page it says it’s updated, but when I go back to check the details the fields are blank.”
I also posted the error messages from the Apache error log further down the page.
I’ve tried updating the group with snapins, and this hasn’t saved either, so it seems to be a general issue of saving groups, rather than a specific one of setting the Active Directory defaults in the group. -
@RobTitian16 Maybe do some datebase cleanup: https://wiki.fogproject.org/wiki/index.php/Troubleshoot_MySQL#Database_Maintenance_Commands
I’ll mark this solved as the AD joining issue is actually solved. Please open a new thread if you still have the group assignment issue after the DB maintenance.