Equivalent su in powershell

Let's say I'm the Windows7 window administrator. I would like to be able to run commands like other users without knowing their passwords. This is what happens on Linux. If I'm root, I can "su" for other accounts without providing any passwords and running commands under my name.

+7
source share
2 answers

su (user or sub-user of the switch user) allows you to change the account associated with the current terminal. If the Normal user must provide the password for the account that he wants to change, the superuser (root) can change any desired identifier without specifying a password.

sudo executes the command as another user, but it observes a set of restrictions on which users can execute commands, which other users (usually in the configuration file named /etc/sudoers , are best edited with the visudo command). Unlike su, sudo authenticates users from its own password, not from the target user (to allow delegation of certain commands to specific users on specific hosts without sharing passwords between them and while reducing the risk of any automatic terminals).

In windows, runas.exe allows the user to run programs with different permissions, which provides the current user login. But for this you need to provide credentials. Windows security does not allow an administrator to act as another user without his credentials. Administrators can do what they want, but not under the limitations of certification without control (discretionary power).

Now, when he said, in Windows, the administrator can take and transfer the rights to resources, and then do what he wants, but he registered.

+7
source

In PowerShell Icon> Right-Click> Run as Administrator

0
source

All Articles