Open martimarkov opened 6 years ago
The log is mandatory to solve this issue.
pGina.Service.ServiceHost_log.txt pGina.Configuration_log.txt pGina.InstallUtil_log.txt
Here are all logs.
company_name is the name of the machine user (admin) and also the name of the company as the domain name pgina_user_account is the name of the pgina/ldap user
I'm guessing this is a changed behavior. Out of curiosity: Why/what was the reason? :)
Nothing has changed It works's that way
Well, it did work without a problem in the previous .10 release. Also maybe there should be a timeout, instead of having to reboot the machine. Also the cancel button is non responsive.
Is there a way for the script to be visible? To check what is going inside?
Another piece of info. I'm now getting a message saying that a program was started not by pgina and therefore the user cannot login. I'm using this as a logon script: cmd.exe /c start ”” /i powershell.exe ....
Ok, so at the very least this script runs in some different session. I have mounted a webdav drive and the powershell script can list the directory but i can't access it as the user. This was definitely not the case in the previous version.
If your script is mounting the webdav folder as a different user than only this user is able to use it. If you only need to mount a webdav folder, why not use net use ?
Inside the script net use is used and then does some other thing after the mount. The script runs as the current user. Again the problem here is not the script as it worked before but rather changed behaviour in the new release.
I've verified the plugin and its working properly Add your script @ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run or @ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup and test it ...........
Thanks, will do tonight and report.
Just tried it by putting the script inside C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
and it works. Anything other you can think of I can test?
I do think it is the way the invoke function was changed as previously it was running: StartUserProcessInSessionWait
and the userToken
there is probably different than hToken
the one in StartProcessAsUserWait
. We are getting it from different functions:
This seems like the only difference in the logic between the versions.
I'm using StartUserProcessInSessionWait() now for user logon scripts and only logoff user script are using StartProcessAsUserWait() Test it with this version ..... pGinaSetup-3.9.9.11.zip
Just tested it. It works.
I uninstalled pGina 3.9.9.10
Rebooted
Removed the registry settings
Installed pGina 3.9.9.11
Rebooted
Login with pgina user
Logout
Login with pgina user
Logout
Login with local machine user
Configured the login script step to execute a PowerShell script:
powershell.exe -executionpolicy bypass -file C:\webdavMonitor.ps1 -password %p > C:\Logs\mount_log.txt
Logout
Login with pgina user (script not working but I can debug with a few tries as this is not the problem i think; thou the script does have an infinite loop inside; )
Logout
Login with local machine user
No processes or sessions are active from previous pgina user
Logout
Login with pgina user
The screen hangs on "You will be logged in. Please wait ..." The cancel button is not responsive.
The only solution is to reboot the machine. I can't attach the log as I'm not physically next to the machine.
I have the default scripts enabled thought the testing and they seem to behave fine.