rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Tharless on June 02, 2016, 02:30:29 PM

Title: Automatic login using macros / Automatic user recognition
Post by: Tharless on June 02, 2016, 02:30:29 PM
I have at the office an "Active Directory" where we have a lot of users. First, I make in the server an user to the domain, and then using a script, I make that user in HFS. What I'm looking for?: that when some user enters at the server page, HFS using a macro detects the logged Windows user, and if that user exist in HFS, then automatically validate it, so the user doesn't have to insert the password. If the user doesn't exist, then it will ask for a password. Is that possible to do using macros?.

I did some tests, and by using IExplorer I can get the user name if I use ActiveX, but there is no way to send that back to HFS. Other browsers doesn't have this ActiveX function. Currently, I'm using a .bat (Batch) to get and save the user in a .txt file, but I can't find a way to load the name of the .txt with the function "filename" (it doesn't work). I'm trying to upload that, to make and automatic login, or looking for another way to do this. Can anyone help me. Thanks.
Title: Re: Automatic login using macros / Automatic user recognition
Post by: bmartino1 on June 02, 2016, 03:49:49 PM
is sounds like your wanting the mac addrss of the machine to become a "logged in user"
Title: Re: Automatic login using macros / Automatic user recognition
Post by: Tharless on June 02, 2016, 04:31:32 PM
But you see if the mac is the name of a txt file.
Title: Re: Automatic login using macros / Automatic user recognition
Post by: LeoNeeson on June 03, 2016, 06:45:43 AM
is sounds like your wanting the mac addrss of the machine to become a "logged in user"
Nice idea, since the MAC Address is unique. Now the hard part is how to recognize or "read" the MAC Address of someone who visits our HFS server webpage. I've found some interesting results, searching "How to read MAC Address with a browser (https://www.google.com/search?q=How+to+read+MAC+Address+with+a+browser)" on Google (but it seems it only works for IE with ActiveX, and it doesn't work on Firefox, as you can read here (http://www.codingforums.com/javascript-programming/299234-how-get-mac-address-client-machine-using-javascript-all-browsers.html)). I don't see an easy solution for this. :-\

Another option would be using the so called "EverCookies (http://samy.pl/evercookie/)", so the user log ins once, and then can be recognized by this cookie more easily. It's not 100% flawless, and requires the user to login at least once.
Title: Re: Automatic login using macros / Automatic user recognition
Post by: rejetto on June 19, 2016, 07:02:39 PM
I did some tests, and by using IExplorer I can get the user name if I use ActiveX, but there is no way to send that back to HFS.

you can send back the information to HFS by making an ajax request with this data in it:
__USER=whatever
__PASSWORD=whatever
__AJAX=1
Title: Re: Automatic login using macros / Automatic user recognition
Post by: raybob on June 25, 2016, 01:32:07 PM
You could also pay someone $10000 to go about a huge project where you use HFS macros to launch command line PHP which then uses the LDAP extension :P

Also I'm pretty sure that windows directory logins are only a thing when used with IE.
Title: Re: Automatic login using macros / Automatic user recognition
Post by: bmartino1 on June 25, 2016, 02:14:00 PM
yes, most of the microsft stuff suchas ldap are "Internet Explore" specfice, but with edge and the new server core, microsft is starting to bracnh out to hte other wreb browsers. i haven't checked the newset 2016 server stuff, but iss 8 had ldap stuff for  firefox....

most ldap stuff actual inst' web based, it autheticat based for the "active directory", adn i would like to see hfs take on a windows base to incoperate domain logins.... (makes it easer then to read acounts.

but this is why i run them side by sie... and use iis core for the main site and hfs as a call scritp for other stuff....
(HFS is the reveser proxy site)
*this way i also get my php stuff
https://php.iis.net/
http://www.iis.net/learn/application-frameworks/scenario-build-a-php-website-on-iis/configure-a-php-website-on-iis
Title: Re: Automatic login using macros / Automatic user recognition
Post by: Agret on August 12, 2016, 04:41:20 AM
LeoNeeson you are on the wrong path. Rather than asking the browser for the mac address since the server is on the same LAN as the host they can get the mac address from the socket. Just have to resolve the IP to the appropriate MAC using Windows ARP table. Write "arp -a" into cmd for an example :)
Title: Re: Automatic login using macros / Automatic user recognition
Post by: LeoNeeson on August 13, 2016, 07:06:27 AM
@Agret (http://www.rejetto.com/forum/profile/?u=4016): It's true, "arp -a" (https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/arp.mspx) works well (http://www.dummies.com/how-to/content/network-administration-arp-command.html), since he is working on a LAN. Sadly, Tharless (http://www.rejetto.com/forum/profile/?u=88884) has forgot to visit the forum, and I don't know if he has solved his "problem".
Title: Re: Automatic login using macros / Automatic user recognition
Post by: Tharless on October 18, 2016, 05:20:42 PM
Hi guys and mates,

My problem is resolved partialy, but i am study the activex for iexplorer in which I can validate the user but still I manage to not pass the hfs to take it, the problem now is how to do in Mozilla Firefox and other web browsers.
Title: Re: Automatic login using macros / Automatic user recognition
Post by: bmartino1 on October 18, 2016, 06:22:21 PM
it the "web agent", and usually a pre- generated cookie.

https://en.wikipedia.org/wiki/User_agent

 
Title: Re: Automatic login using macros / Automatic user recognition
Post by: Tharless on October 18, 2016, 06:31:55 PM
Thanks bmartino, i not remember this part Hehehe. ;D