Questions tagged [elevated-privileges]

Elevated privileges are higher privileges, offered by an operating system, usually higher than normal user's privileges.

Elevated privileges are higher privileges, offered by an operating system. They are usually higher than normal user's privileges (for example, administrator privileges are regarded as elevated privileges).

398 questions
8
votes
2 answers

What is the difference between ansible's remote_user & become_user

I need to understand the difference between ansible's remote_user & become_user considering that the play will either run locally or remotely. Difference between: - hosts: all become: yes become_user: user1 - hosts: all remote_user:…
Ashar
  • 2,942
  • 10
  • 58
  • 122
8
votes
1 answer

Why is a shell within a docker container showing dmesg content from the host?

I have a docker container running Debian jessie on Ubuntu yakkety. When within the docker (connected via ssh for instance) I am isolated from the host (which is expected). I however realized that dmesg shows me the messages for the host and not for…
WoJ
  • 27,165
  • 48
  • 180
  • 345
8
votes
3 answers

How can I programmatically edit the hosts file in Windows 7/Server 2008?

I'm writing a little WPF utility to manage entries in the hosts file for dev purposes. As you might know the hosts file is protected by the newer OSs (Win 7/2008/Vista). I've added a manifest to my application to set the requestedExecutionLevel to…
maltem-za
  • 1,225
  • 2
  • 16
  • 23
8
votes
1 answer

Marshal.GetActiveObject("Outlook.Application") throws MK_E_UNAVAILABLE when debugging with elevated privileges

This code run without problem in release r debug when Visual studio isn't started as an admin. Marshal.GetActiveObject("Outlook.Application"); However, when I start Vs as administrator and run the same line in debug, I get the following…
Justin Lessard
  • 10,804
  • 5
  • 49
  • 61
8
votes
4 answers

SharePoint 2007 - RunWithElevatedPrivileges - Pitfalls of using this

I have a strong gut feeling that using SharePoint RunWithElevatedPrivileges should be avoided like the plague, but need to convince some others as to exactly why. Here's what I have. Spawns a new thread with elevated privileges Blocks other…
8
votes
2 answers

How to remote execute an ELEVATED remote script in PowerShell

I have two servers: serverA (windows 2003 server) serverB (windows 7) ServerA contains a folder with a batch file (deploy.bat) that needs to be executed from an elevated powershell prompt. In ServerA, if I run it from a normal prompt or powershell…
7
votes
1 answer

How do I always run Git Bash as an admin on Windows?

I want to run git bash on Windows as an admin, every time I open it. My OS is Windows 10 Home 64-bit.
Malik Bagwala
  • 2,695
  • 7
  • 23
  • 38
7
votes
3 answers

passing quoted arguments from batch file to `powershell start` - self-elevation on demand

I am writing a Windows batch file that automatically escalates itself to administrative permissions, provided the user clicks "Yes" on the User Access Control dialog that appears. I am using a technique I learned here to detect whether we already…
jez
  • 14,867
  • 5
  • 37
  • 64
7
votes
2 answers

How to run some CMD commands on Windows 10 as administrator using Nodejs and spawn?

I am working with Nodejs on Windows 10. Every time the app is opened I want to check if the files with the extension ext are associated to my app. If not I would need to run this commands on cmd in order to make the association again: assoc…
ChesuCR
  • 9,352
  • 5
  • 51
  • 114
7
votes
1 answer

Avoiding UAC but launching an elevated process using a windows service

I have a non-interactive service running as a the privileged SYSTEM user on Windows machines, and I need it to launch a given executable as an elevated process. I have managed to launch a child process as SYSTEM, using…
Liosan
  • 7,520
  • 2
  • 17
  • 16
7
votes
1 answer

Removing Administrator Privilages from Process

With the help of this great MSDN article, my first idea was to simply check if the process is using an elevated Administrator group, and using AdjustTokenGroups() I would set the Administrator group to SE_GROUP_USE_FOR_DENY_ONLY. Unfortunately…
7
votes
5 answers

Start a windows service without elevation

I have a windows service "Service1" configured to log on as "Local Service". I built a console application to start it programmatically. var service = new ServiceController("Service1"); service.Start(); I know that if I run the…
Be.St.
  • 4,101
  • 3
  • 25
  • 35
6
votes
2 answers

How to elevate to root within a python script?

I am trying to write a python script which will ask for root permissions. I have tried using elevate for python (which supposedly shows a dialog box asking for a root or "admin" password), but it gave a "No such file or directory" error when I ran…
nerdguy
  • 174
  • 1
  • 16
6
votes
1 answer

How to allow a SQL CLR function to run in parallel query plan and also have data access permissions

I have a written a number of SQL CLR functions (UDF) that reads data from an external DB2 database hosted on an IBM iSeries (using IBM DB2 .Net Provider). So that the function has the necessary permissions to read this data, I need to decorate the…
Kev
  • 1,832
  • 1
  • 19
  • 24
6
votes
2 answers

Given a username and password, how do you impersonate that user elevated?

In Windows Vista and later, LogonUser returns a non-privileged token, even if the user provided is an administrator. Thus, when you impersonate using that token, you are non-elevated. Given a correct username and password for an administrator user,…
Mark Raymond
  • 906
  • 8
  • 22
1 2
3
26 27