In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
The Runas command allows domain users / ordinary User users to run the example analysis of the specified program as an administrator. I believe that many inexperienced people are at a loss about this. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Simple
For example, you need to start notepad.exe with administrator privileges, and you can write something like this:
Runas / user:administrator notepad.exe
In some cases, for security reasons, most companies use domain controllers or only give employees user rights to user on their computers, which greatly improves security and controllability, but it also brings some problems.
For example, some specific departments (such as finance, logistics) do not have administrator privileges, but the work requires the use of specific plug-ins or programs, and the program or plug-ins must run as administrators, in this case, if we upgrade the user's privileges to administrators, that will increase security risks and may lead to a lot of uncontrollable situations.
In this case, we can use the runas command to specify that a program is run, which is native to Microsoft and can be used by any Windows computer, including in a domain environment. In this way, the problem of software use is solved without sacrificing security.
The following are the usage and examples of runas:
RUNAS usage:
RUNAS [[/ noprofile | / profile] [/ env] [/ savecred | / netonly]] / user: program
Examples of RUNAS usage:
Runas / noprofile / user:mymachine\ administrator cmd
Description: use the Administrator administrator identity on this machine to execute CMD,/noprofile for not loading the user's configuration information.
Runas / profile / env / user:mydomain\ admin "mmc% windir%\ system32\ dsa.msc"
Description: use the admin identity on this machine to scan the msc console. / profile loads the user profile for the specified. / env means to use the current environment.
Runas / env / user:user@domain.microsoft.com "notepad\" my file.txt\ ""
Description: runs as a domain user and specifies that the my file.txt document is opened using notepad.
Practical application examples:
@ echo off
Runas / user:Colin-PC\ Administrator / sa "C:\ Program Files\ Internet Explorer\ iexplore.exe"
Description: run the IE browser as an administrator.
In this way, after we save the command as a batch, as long as we run the batch on the user's computer (enter the administrator password for the first time), the user will simply double-click the file to execute the program specified in the command as an administrator.
-
Is that it?
NO!
If the user has a little computer foundation, he will know how to edit the batch, as long as he changes the specified program path to the program he wants to run as an administrator, won't he be able to do whatever he wants?
Therefore, after making sure that the batch is correct, we should do the encapsulation operation. (that is, a file encapsulated as .exe so that the user cannot modify it. )
Packaging operation is very simple, download a "Bat To Exe Converter" program to convert .bat files into .exe execution files.
The download address for Bat To Exe Converter is as follows:
Http://pan.baidu.com/s/1sjNM8Lf
I will not introduce the conversion method. There are only a few options. I think as long as they are not mentally retarded, they should know how to use them.
The program packaged as .exe is shown below:
In this way, we just put the exe file in the D:\ Program Files directory, and then create a shortcut to the desktop, so that the user can easily use it next time.
Of course, you can omit this step and directly put a .exe file on the desktop to the user, but I hope you still form a good habit, the program had better be placed in the D disk Program FIles directory.
After reading the above, have you mastered the method of Runas command to let domain users / ordinary User users run sample analysis of specified programs as administrators? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.