Tag Info

Hot answers tagged

158

The runas command. runas [{/profile|/noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] /user:UserAccountName program Just run: runas /noprofile /user:Administrator cmd to start a command shell as a administrator


52

You can use the runas command which is kind of similar, or you can check out the sudo for Windows project over at SourceForge which adds a sudo command. The difference is subtle: Let's say you have two users. Bob is a normal user and James is an administrator. If you log in as Bob and use "runas james acommand" the command is run as if it was run by ...


41

I discovered elevate today which "executes a command with UAC privilege elevation. This is useful for working inside command prompts or with batch files." It's not the same as sudo, it changes the executing user to Administrator, but its syntax is a lot more straightforward to use than runas, and it can keep the current directory, enabling the use of ...


32

You can also use the Script Elevation PowerToys.


23

In Process Explorer, double click the process to open its properties. Go to the Security tab. In the group listing, find BUILTIN\Administrators and look at what it says in the Flags column. Deny = Not Elevated (not admin) Owner = Elevated (is admin)


23

.msi files can be executed with msiexec.exe, so in combination with the runas command, you could accomplish what your want: runas /user:administrator "msiexec /i <path and filename of your msi>" As a full-path to the file is recommended, it might need quotes around it and you need to escape them then with a backslash \: runas /user:administrator ...


20

Follow steps below 1.Start the mysql server instance or daemon with the --skip-grant-tables option. (security setting) $ mysqld --skip-grant-tables 2.Then Execute these statements. $ mysql -u root mysql $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root'; $mysql> FLUSH PRIVILEGES; 3.Finally, restart the instance/daemon ...


18

If you're doing this on Windows, then in addition to the Run As command as mentioned in a couple of other answers, there are also ways to do this with the mouse. If you hold down the Shift key as you right-click on most executable files in Windows you should notice a few more advanced options. One of these is the "Run As..." option (I think it's called "Run ...


16

Probably that is not a problem of file permissions but it's related with: Network shares being associated with sessions (i.e. different users may have a different set of network shares). Note that an user can have more that one session. How User Account Control works. Since almost all users used an administrator account in XP (as most programmers didn't ...


15

In Process Explorer you can change the columns displayed and add the "Integrity level" column: This is apparently the technical term for what is changed when you run a process with administrator privileges. If you run Process Explorer as an Administrator it will show ordinary processes as 'medium' integrity level and elevated processes as 'high'. Note ...


15

Try explicitly running the cmd shell as administrator. If that doesn't help, then try the runas command. runas /user:administrator "mklink args" Quotes around the mklink command and its args are required.


14

You don't give your distribution, but since you aren't installing as root it's probably not important. (The binaries are meant to be installed system-wide, so unless you can convince your system administrator to install the package, you'll need to compile and install to your home directory.) Essentially, Dropbox's Linux client is two parts: a daemon, ...


12

On Windows 7 (as well as Vista), an administrator account does not necessarily run a program with administrator priveleges. As an administrator, you have the credentials to perform administrator functions (creating/modifying user permissions being one of them, etc.). However programs are still run in a secured mode, in which they are prevented from doing ...


11

If the process is running with root-privileges, you could attach gdb to the process and call seteuid from within that process. Example: [root@user-desktop ~]# id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=user_u:system_r:unconfined_t [root@user-desktop ~]# gdb /bin/bash $$ GNU gdb Fedora (6.8-27.el5) # ...


11

If you are ready to switch to alternative consoles, there is ConEmu (I'm the author). One of its features - the ability to run both elevated and non-elevated tabs in the one ConEmu window. Tabs may be started with different credentials too. For user comfort, there is batch-file csudo.cmd (which may be easily adopted to bash). Read full description in ...


10

It looks like this utility - Hidden Start - will do what you wish if you use the /uac switch. Here's an example command line: hstart /UAC "notepad.exe" This will pop up the UAC dialog rather than ask for a password like runas does.


10

The simplest and best way to do this is to set your application to be started when you log in, with Task Scheduler (Start search, or Administrative Tools -> Task Scheduler). Check the "Run with highest privileges" box on the General tab. On the Triggers tab, create a new trigger for when you log in. On the Actions tab, create a new action to start ...


10

Go to the Start button; Type in Explorer; Shift Right-Click "Windows Explorer"; Run as different user. That user will also need privileges to access the file system on the local machine, and perform any futher operations you'd like to execute.


10

You need to install .net 3.5 (Even if you have .net 4+ installed) You do this through the Server Manager: Configure local server Add roles and features Click next until you get to the features section Check the .net 3.5 check box (I also checked the sub items for good measure) If you get a warning about needing to Specify an alternate path, then: ...


9

sudo always requires the executing user's password (and requires that you have specific permissions to do this, i.e. are one of the sudoers). su requires the password of the target account (root by default, but root account has no password on OS X by default). If you use su instead, you can enter the destination account's password and execute a command ...


9

This article covers quite a few options of how to do this. Among them are: Using BeyondTrust in the Enterprise Use Task Manager to launch startup applications Use the Application Toolkit to disable UAC for selected application Switch off UAC (Not Recommended / Bad Practice) The option to Always run as administrator available when Right Clicking and going ...


8

Opening a Windows Explorer as administrator and recreating the network shares didn't work for me. Then, I found this solution: create the share on the command prompt itself. It worked for me. net use f: \\remoteserver\\subfolder Even if the drive is already mapped in windows explorer, still it worked.


8

You don't need to run explorer.exe as a different user just to connect to a network share with different credentials. In an explorer window you can click on "Map network drive", fill in the path and and make sure to check "Connect using different credentials". When you click the finish button you will get prompted for the credentials you want to use to ...


8

Yes. Turn UAC back on! Technically, the program will still run under the context of your account, but UAC will prevent system wide changes without authentication first. The only other option is to create shortcuts and then right click, and choose Run as different user then choose an account which does not have administration rights.


8

What you need to do is embed an application manifest into the EXE. Save the following as a text file called App.exe.manifest: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> ...


8

Dale Hagglund is spot on. So I'm just going to say the same thing but in a different way, with some specifics and examples. ☺ The right thing to do in the Unix and Linux worlds is: to have a small, simple, easily auditable, program that runs as the superuser and binds the listening socket; to have another small, simple, easily auditable, program ...


7

Well, let me answer one part of your broader question first: how to do it. My immediate experience is on Linux, but you said that answers on any platform were welcome, so here goes. If you were on Linux, you could probably require root access to access your cookies in any way other than (in principle) deleting them. The general procedure would look like ...


7

You should not give the root password to users who do not need full root access. Keep the root password secret and use sudo to give restricted users access to just what they need (see man sudoers for some examples)


7

type CMD, you will see CMD.exe in the list at start menu. Right click on it, select "Run as Administrator"


7

There are a few ways to do this. Ubuntu's graphical login is provided by GDM (or KDM if you're using Kubuntu). GDM is started by the Upstart subsystem. The startup process follows these steps: System boots. Upstart starts services, including GDM (/etc/init/gdm). GDM starts, initializes the X-server (/etc/gdm/Init/*), and presents the GUI login window. ...



Only top voted, non community-wiki answers of a minimum length are eligible