Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is Awesome, but... #1

Open
willgonz opened this issue Nov 17, 2022 · 2 comments
Open

This is Awesome, but... #1

willgonz opened this issue Nov 17, 2022 · 2 comments

Comments

@willgonz
Copy link

willgonz commented Nov 17, 2022

Do you think there would be a way to make the PowerShell Script Run as the user who is visiting the page? I have been able to get the Remote_User to show up as the User who is visiting the page, but I enabled Windows Authentication under Authentication for the site. Can't use Impersonate User because that isn't working, but maybe the CGIWraper process needs to run with Impersonate User? Also the reason for run as the authenticated user is so I can do some Get-ADComputer without this error 'Get-ADComputer : Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.' when I specify an account with -Credential and an account it works, but not really secure.

@thordreier
Copy link
Owner

Hi

In my expirience enabling "Basic Authentication" and disabling "Anymous Authentication" should be enough.

But for some reason some environment variables show wrong information - see example below.

If you always want to run the site as a specific user - without HTTP authentication - you should also be able to define a user if you select "Edit" under "Anonymous Authentication".

'Content-Type: text/plain'
''
'This show computer account:'
$env:USERNAME
''
'This show user account:'
whoami

@BoomImooZ
Copy link

image
Я столкнулся с проблемой, что при аутентификации пользователя через базовую аутентификацию, появляется вот такая ошибка при запуске скрипта, если добавить его в группу Администраторы или Доменные администраторы, то проблема уходит.
Кто нибудь знает на что не хватает прав?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants