MutonUfoAI / pgina

pGina fork: Open Source Windows Authentication
http://mutonufoai.github.io/pgina
BSD 3-Clause "New" or "Revised" License
156 stars 39 forks source link

F-Req: any possibility to set account-flags on (first) logon? #153

Open sh-dvl opened 4 years ago

sh-dvl commented 4 years ago

when using the mysql-auth-plugin, locally created user hasn't set any flags, so we have to it manually (which makes using pGina less efficient):

I'm neither familiar with pGina-code, nor the windows-auth-process, so I don't know, if it's possible at all within the auth-mechanism and if, where to work at best. (is there any documentation about the call-chain on login?)

another way may be possible, too, and maybe this offers more possible features: calling system-scripts with the username after successful auth, but before showing the desktop... or is this already possible somehow?

MutonUfoAI commented 4 years ago

http://mutonufoai.github.io/pgina/documentation/plugins/scripting.html

sh-dvl commented 4 years ago

ok, thanks, this is working for the actual problem.

unfortunately it's not clear, when the scripts are called in the various stages. always at start of the stage (authen,author,gateway) or it's end? (perhaps relevant, because the user must be know by windows itself or the profile must already be created)

I've now put the script into the notification-stage, as it seems, that this is only called, if the previous stages run successfully -- or am I wrong?

MutonUfoAI commented 4 years ago

It runs depended on the plugin order In your case it would be useful to put it behind the local machine plugin in the gateway stage. http://mutonufoai.github.io/pgina/documentation/plugins/local_machine.html#gateway_stage

sh-dvl commented 4 years ago

thanks.

but it seems that the scripting is not 100% reliable. this could be due to restrictions, but even simple tests don't seeem to work, while others do.

I've had a look at pGina.Service.ServiceHost_log.txt, but nothing corresponding can be found there.

due to that pGina does these scripting-calls synchronously, it should get at least the information, if that call could be successfully placed or not (e.g. path not found or returned error) sure, pGina ignores these errors, but is there any possibility to put such calls and there return-values into the log?

quick view into log4net.config didn't show a simple possibility for that...

(btw.: many thanks for your time even for continuing work at pGina and now nearly just-in-time help to get special requirements running)

MutonUfoAI commented 4 years ago

but it seems that the scripting is not 100% reliable. Made some tests and it is 100% reliable. You have to make sure that your script is running properly. That's the reason why I've added the default scripts, and yes the scripting plugin is logging the whatever you want to do and the return code.

Logging is done at pGina.Service.ServiceHost_log.txt http://mutonufoai.github.io/pgina/documentation/user.html#logging