EzDevInfo.com

privileges interview questions

Top privileges frequently asked interview questions

Is there any 'sudo' command for Windows?

I always work on a non-administrator account on my Windows computer. Sometimes I need to install programs which requires administrator access. As I mostly use the Windows command prompt, is there a Windows command to escalate privileges, similar to the Linux terminal command sudo?


Source: (StackOverflow)

Elevated command line prompt can't access shared drives in Windows 7

  1. I map a share from another machine using my user account.
  2. I launch an elevated command prompt (cmd.exe, right click, Run as administrator).
  3. Navigating to shared drive (Z:) results in:

The system cannot find the drive specified

Now if I open a non elevated command prompt, I can navigate to Z: just fine.


Source: (StackOverflow)

Advertisements

What is the correct way to prevent non-root users from issuing shutdowns or reboots

Let's say that you have set up a multi-seat system for use in a school or library, allowing GDM to launch multiple X sessions to run simultaneously with different users/keyboards/monitors.

By default in Debian/Ubuntu in Gnome, you don't have to be root to shutdown or reboot. But this means any user can choose "reboot" or "shutdown" and kick off the other three users.

You have blocked physical access to the server so they can't simply push the power or reset buttons.

What is the correct way of disabling the "shutdown" and "reboot" functionality which is exposed to regular users through GDM/Gnome/whatever window manager you're using?


Source: (StackOverflow)

What is the difference between the Administrator account and a User account that has administrator privilage?

The Backstory

Wife has a multiplayer Minecraft Server that she runs Tectonicus (a map generating program) against. Tectonicus is set up to use OpenGL (aparently ONLY OpenGL). When attempting to run it as a user with Administrator privileges (tried both vanilla and Run as Administrator) it fails when accessing OpenGL. When running it in the Administrator account it works.

The Question

My questions really pertains to the file and resource permission context in the difference between the Administrator account and a User Account with Admin privileges?

Bottom Line

She wants this to be run on a schedule to auto refresh changes in the map, and I am against getting into the Administrator account to do things if I don't absolutely have to. Any thoughts?


Source: (StackOverflow)

as a domain member, 'run with administrative privileges' always asks for hostname

Since we run Windows 7-clients in our windows-server domain I have a specific use case that has become more inconvenient:

On the client-site, being logged-on as an user with restricted rights and having the user account control (UAC) activated on the highest level, you can run an application with administrative privileges by right-clicking onto it and choosing “Run as administrator”.

After that, a popup window is shown and asks for the username and password.

As a domain member you now have to enter your full hostname with a backslash following and the user name with administrative privileges (e.g. Administrator) in order to authenticate as local administrator.
On XP-machines you simply had to type in “Administrator” for the username.

That makes administration more inconvenient if you run various Windows-7 clients in a company, because you always have to lookup the hostname for the machine on which you want to run something with administrative privileges.

Is there a registry setting or a good workaround that lets you authenticate as administrator without having to enter the hostname for the machine, but not using tools like "RunAsSPC" or "Steel RunAs"?


Source: (StackOverflow)

Windows Store not recognizing Admin privileges

I'm trying to upgrade a new Dell laptop with Windows 8 to Windows 8.1. Using the default user logon created at initial boot, trying to upgrade to 8.1 via the Windows Store, I get the following error:

"You need to use an account with Administrator privileges to install Windows 8.1, try logging in with the user account of an administrator of this PC and trying the update again."

Putting aside the grammatical error of Windows Store, I can't tell why it is not recognizing admin privileges.

Doing a

"net localgroup Administrators"

lists the username in the group.

Creating an additional user with admin privileges to perform the install seemed to work but I don't understand why the original account didn't.


Source: (StackOverflow)

How to execute a command with admin privileges and access to files of the logged in user?

I have some problems understanding sudo. I am logged in on a terminal as an non-admin/non-root user. This "normal" user is not in the sudoers file (and shouldnt be, in my opinion).

Now I try to execute a command that needs admin/root privileges and also access to directories of my normal user – therefore I am not able to simply su into an admin or root user.

In my understanding sudo -u root should do the trick – however it doesn't accept the password for root (or admin if I try with my normal admin user). It only accepts the password of the "normal" user which seems to indicate that the -u username option doesn't work the way I expect it to work.

My expectation is that sudo -u root some_command executes some_command with the privileges of root and therefore it asks also for the password of root. Obviously not.

TL;DR: How do I execute any command that requires admin privileges AND has access to the files of the "logged in (normal) user" without adding the normal user to the sudoers file?

I have enabled the root user under Mac OS X 10.7.


Source: (StackOverflow)

"login" to phpMyAdmin via different users

I want a non-techie (marketing/sales) to have access to the data I manage regularly via phpMyAdmin:

  1. without any ability to alter/insert/delete
  2. without me having to build a special database-viewer-app

I have created a new User with limited privileges, but I don't want My non-techie to have to use a command prompt and learn mysql commands.

Optimally I want him to be able to go to phpmyadmin UI, but only have the abilities allowed (in this case read-only).

Do I need to set up a separate phpmyadmin where the controlling user is this weaker user? Or is there a special "log in as a specific user" interface I've missed in the documentation?

UPDATE:

I've seen login screens as googletorp suggested when i used pmas auto-installed by hosts but never on the out-of-the-box versions i've installed.

I tried commenting out $cfg['Servers'][$i]['user'], and $cfg['Servers'][$i]['pass'] googletorp suggested - that perhaps it would present me with a login screen. But instead I get error #1045:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

Then I thought to perhaps comment out the $cfg['Servers'][$i]['controluser'] and $cfg['Servers'][$i]['controlpass']. But the comments say they're already supposed to be a read-only user.

hm...


Source: (StackOverflow)

Run a program without administrative privileges in Windows 7 [duplicate]

This question already has an answer here:

My account in Windows 7 is an administrator account. When I open the Run box (WinKey + R), I am warned, "This task will be created with administrative privileges."

enter image description here

Is there any way to run programs as myself, but without administrative privileges when logged in as an administrator?


Source: (StackOverflow)

How to prevent dirty hands from touching my cookies?

According to my other question, it seems that my cookies are unprotected. (I should have known that as there was a time I just manually deleted cookies from Internet Temporary Files.)

So to make my question a little bit more general:

How to prevent a program on my computer from accessing some resources on my computer?

Or the other way around:

How to open access of some resources only to selected programs?

Or an seemingly impractical request:

How to make programs ask for permission when they want to access certain resources?


Though Windows 7 makes it a rule to request administrative privilege when changes are made to system files. However, access to (I mean, just view) resources is open to all programs.

Virtual machines seem to be a choice, but those programs isolated by a virtual machine stand no chance to view any of the resources of the outer (host) system, which does not seem to be preferable.

I am using Windows 7 now, but solutions on any OS are welcomed.


Source: (StackOverflow)

ubuntu and privilege elevation in i3wm

I use i3wm (www.i3wm.org) as the window manager for ubuntu 11.10 x64.

it seems that whatever piece of magic that controls elevation is not functioning properly. It's not an issue with i3wm perse, but rather something provided by gnome and unity that im missing, and need to implement manually.

example:

in unity, if i run software center, i am prompted for my admin password, and everything works as expected. in i3wm, running software center does not prompt, and thus i cant install anything. (unless i do sudo software-center from the CLI)

is there some process / application i should be using to have apps ask for admin passwords when required?

it'd be great to get that bit of functionality in i3.


Source: (StackOverflow)

How do I configure my application to run as administrator automatically?

I have created a patch file with an executable inside of it using Winrar SFX feature.
After executing the SFX file and the extraction ends up, my executable file will never run because it doesn't have admin privileges. I am wondering HOW I can grant administrator access to that file by some programming way (like a batch file).

I know that I can right click it, go to "Properties", choose "Compatibility" tab and then tick the box "Execute as Administrator".

The problem is that the users who will download that patch doesn't know it (and my exe only runs when you right click it and choose "Open as administrator", otherway it will never open nor display the UAC popup).

I have tried some ways, like the "Elevator Runner (Elevate me)", etc, but I'm actually looking for something simpler than.
I just need to make the exe always run as administrator.


Source: (StackOverflow)

Install Silverlight for Mozilla Firefox without administrative privileges

Is there any way I can install silverlight plugin for Firefox without admin privileges? For Flash there's an .xpi extension so that I can install it on Firefox Portable.


Source: (StackOverflow)

Automatically execute bash script under the privileges of another user

Is there a way to execute a bash script under the privileges of another user (automatically)? I think "sudo" is the right way, but I don't know how to automate the process.

E.g. I want to run something like this (user "bla" runs a process under "blub"):

sudo <the user under which i want to run the process> <path to script>

Source: (StackOverflow)

What is 'Run as Administrator' in Windows 7? [duplicate]

On my Windows 7 machine, I am an administrator. I see, when I right click an app, it has an option Run as Administrator. What does this mean?

Also, if I am logged in as administrator, what significance does this have: Run as Administrator? Why does it need to be mentioned explicitly?


Source: (StackOverflow)