On Linux systems, programs are generally run under the system user. Of course, other users can also run the program, but only through some settings to let the program execute in other users. This article will introduce Linux's way of executing programs as other users.
First, runuser command:
Overview: The runuser command runs a shell with an alternate user or group ID. This command is only useful for the root user.
Runs only with the session PAM hook and there is no password hint. If a non-root user is used and the user does not have permission to set the user ID, this command will fail because the program does not have setuid. Since runuser does not run authentication and account PAM hooks, it is lower than su.
The syntax is as follows:
Precautions for use: Use the runuser command, no password is required, and it can only be used under the root user.
two, su command
1. Overview: su command allows you to become a super-user or an alternative user (substitute user), deceive users (spoof user), user settings (set User) or switch user. It allows a Linxu user to switch the current user to the target user who knows the password, switching to include the running console or shell associated with it
Its syntax is shown below:
2. Switch to the root user: The su command will ask for the password of the target user. Enter su - in your shell command line to switch to the root user (you must know the password of the root user)
If the correct root password is entered, the ownership of the session (this should refer to the context of the current console — — translation) will be changed to the root account. Enter logout to exit a root login shell and enter the whoami or id command to verify the owner of the current session. Previous12Next page Total 2 pages
With the increasing variety of Linux system versions, many users do not know which version of the Li
Recently, CentOS users reported that there was a problem when debugging the network
tmpfs is a memory-based file system that can be used after installation. The following small series
log4cxx log library is a dynamic library for logging c++ logs, then how to install log4cxx log libra
Linux when installing PyCharm prompts can not start PyCharm error how to do?
How does the Linux system simulate the get or post request of Http?
Linux network management command list
Ubuntu install libgdiplus error how to do?
Linux Vsftp error 500 OOPS how to fix
How to directly execute PHP script files in Unix/Linux?
Linux to create file or directory soft links, hard link skills
Steps to set up UFW firewall on Ubuntu
Detailed explanation of the functions and parameters of the Linux system ar command
Linux uses vim for multiple file lookup and replacement methods
Windows7 system to create a system restore point method (graphic tutorial)
Win10 notebook boot black screen reason analysis and solution
How to use usb wireless network card Desktop wireless Internet map for tutorial
Have you met? Top 10 most prone to PC disasters (1)
Win10 mobile version 10052 released to fix stability issues
How does Win8.1 automatically shut down? Three Win8.1 automatic shutdown settings method
Notebook win7 system wireless network connection is restricted or no connection solution