Issue: After executing the "su– username" in the shell script, the script terminates execution and switches to the interactive interface behavior of the specified user name in su: I execute a script in root, but some of these commands or scripts must be executed by the Oracle user. ,[Email protected]vi /data/itf/app/oracle/sync/test. SH #!/bin/-xsu -/nolog eofconn hxy/ Select * from dba_tables;exiteofAfte
Before I had summed up a little Ansible series Bowen, this article also take the previous space bar. In the current network application, the security-hardened host is not allowed to log in directly to the root user, and many commands require root users to perform, without rebuilding the current network. Hope that through a common user first landing, and then Su-cut to root execution. and the passwords for the regular and root users of each host are di
Sudo and su-general Linux technology-Linux technology and application information. The following is a detailed description. You may have seen one of these two commands. Ubuntu users are more familiar with sudo, while SUSE, Fedora and Debian users are more commonly used with su commands. What are the differences between the two commands?
Both commands allow you to get the root permission. The difference bet
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.1. Command functionThe role of SU is to change to the identity of other users, except the superuser, who needs to type the user's password.2. How to usesu [-FMP] [-C command] [-s Shell] [--help] [--version] [-] [USER [ARG]]3. Parameter description-F, –fast: Do not need to read the boot file (such as CSH.CSHRC, etc.), only for CSH or tcsh two kind
Deep understanding of the difference between Sudo and SuThe maximum difference between the two commands is:The sudo command needs to enter the current user's password, and the SU command needs to enter the root user's password. Another difference is its default behavior. The sudo command only allows a single command to run with elevated privileges, while the SU command launches a new shell, allowing you to
The most essential difference between the SU command and the Su-command is that the former simply switches the root identity, but the shell environment is still the shell of the normal user, and the user and the shell environment are switched to root. The PATH environment variable error does not occur unless you switch the shell environment. After the SU switch t
Su Command and sudo serviceThe SU command is used to switch the user (switch the lander)Format:su [-] User name[-]: indicates an environment variable that uses a new userUse the [-] function:[Email protected] test1]# echo $PATH #查看root的环境变量 /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin[Email protected] test1]# Su-linuxs Last Login
I. Using the SU command to temporarily switch user identities1, SU's applicable conditions and powerThe SU command is the tool to switch users, how to understand it? For example, we use ordinary user Beinan login, but to add user tasks, execute useradd, Beinan the user does not have this permission, and this permission is exactly the root of the own. Solution can not have two, one is to exit Beinan user, re
Linux prohibits non-WHEEL users from using the su command
Generally, you can log on as the root user to configure the system as Administrator by executing the "su-" command and entering the correct root password.
However, in order to further enhance the security of the system, it is necessary to establish an Administrator group that only allows users in this group to execute the "
Typically, a typical user can log on as the root user to configure the system at the administrator level by executing the "Su-" command and entering the correct root password.However, in order to further enhance the security of the system, it is necessary to establish a group of administrators, only allow users of this group to execute the "Su-" command to log on as the root user, and let other groups of us
Example of SU:
Su switches to the root user by default without adding any parameters, but does not go to the root user's home directory. That is to say, it is switched to the root user, however, the root logon environment is not changed. You can find the default logon environment in/etc/passwd, including the Home Directory and shell definition;
[beinan@localhost ~]$ suPassword:[root@localhost beinan]# pwd
Webmaster
From pole mergers and acquisitions Mydown, Baidu acquisition of the sky and other examples are not difficult to see, download site has become a hot topic in this period of time. And in the hardware-driven download type of Web site, the drive home has been "hogging" the Chinese internet for many years. But this still does not stop the many passionate and intelligent entrepreneurs in the Internet, driving the Chinese founder Su Yang is an exam
Designed to illustrate the basic usage and differences of the SU and sudo commands in CentOSKnowledge Reserve
1.Linux is usually not recommended to log in as root directly, too dangerous! However, as a regular user login, and at some point by the authority to suppress, Su and sudo is a good solution;2.su is usually used to temporarily switch to a user ident
In a Linux system, there are times when ordinary users can't do something, unless it's a root user. Then you need to use the SU command to temporarily switch to the root identity to do things.
su:substitute[' sʌbstɪtjuːt] instead of user
The SU syntax is:
Su [option option parameters] [users]
-,-L,--login Login and change to the user environment of the switc
OverviewMost Linux servers do not recommend that users log on directly to the root user. On the one hand can greatly reduce the damage caused by misoperation, on the other hand, it also reduces the risk of privileged passwords being compromised in insecure networks. For these reasons, you need to provide an identity switch or privilege or privilege elevation mechanism for ordinary users to perform administrative tasks when necessary. At this point, you need to use the
There are two users: mylinux and root using the command: su [mylinux @ localhost ~] $ Su password: su: identify the fault [mylinux @ localhost ~] $ Run the following command: su-root [mylinux @ localhost ~] $ Su-root password: su:
I can neither speak, nor stop. After some tangle, continue. Let's go back and start now... ...
How long will it take to get home.
For a piece of Qinqin, a pot of wine, and a xiyun ---- Su Dongpo xingxiangzi
Su Dongpo's Keyword: family, friendship, love, career, talent
Affection: there are countless love poems written about the Moon in Chinese history, but Su
For Linux users, you can use the su and sudo commands. the use cases of these two commands are different. Su if your current identity is root, you can use the su command to switch to any other user (no password required), as shown below: [root @ lx200 ~] Su-oracle [o
For Linux users, you can use the
users can use the SU command to password-free login to the root user, however, we cannot use the same method to make the Su-free switch between ordinary users.In the intranet cluster, to achieve password-free switching between ordinary users, only need to do the following 2 steps:1) Implement Userb-->usera password-free SSH login by executing two commandsSSH-KEYGEN-T RSASsh-copy-id-i/home/userb/.ssh/id_rsa
One, Su Rights managementNon-root accounts can be su to root, managed through/ETC/PAM.D/SU# Uncomment the following line to require a user to being in the "wheel" group.# Auth required pam_wheel.so Use_uidAfter canceling the comment, all other users are only able to su to root in the wheel groupIi. changes to the order
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.