Start Apache service unexpectedly prompt permission is not enough, with SU switch, enter password hint authentication failed, this is done, and then once the original Ubuntu installed, root user is locked, not allowed to log in, and do not allow Su to root, For desktop users this may be to enhance security, but the server version of this is not true, and quickly set it down.Under Terminal[email protected]:
When working with such problems, the server needs to switch from root to PostgreSQL to install the user to start the PostgreSQL service.The switch user and start PostgreSQL commands are as follows:# Switch to Pgsql user su postgres# starting Pg_ctl start -bash:pg_ctl:command not foundHint that the PG_CTL command does not exist, but it is certain that the previous installation of PostgreSQL is so started, how can not this time.Later learned that the or
#su [OPTION] USERNAME switch users[OPTION]-Change the current working environment PWDNull default switch to root userBy default, SU only switches paht and users to username and does not change pwd. Use-and landing in username is essentially the same.#sudo [OPTION] COMMANDA user executes a command from a host with the permission of another user without switching users.[OPTION]-L lists all sudo class commands
ubuntu with Su switch, enter the password prompt authentication failed, after review originally installed in Ubuntu, the root user is locked by default, do not allow login, and do not allow Su to root, for desktop users this may be to enhance security. Under Terminalsudo passwdPassword: Enter New UNIX Password: Retype new UNIX Password: passwd: Password has been successfully updatedUbuntu with
Some of the problem-solving approach is not very troublesome, but if you can't find a way, will always drag there waste time, so if there is just one article to solve this problem, you can save a lot of time.Under the newly installed Ubuntu system, I am 14.0.4 do not know whether other systems will be the same problem. When you enter the SU command to get root permissions, there is aThe problem with authentication failure is that authentication fails.
Tag: su
Su command details
Su switches to another user, but does not switch environment variables.
Su-completely switches to a user environment
Parameter description
-C command: the user who changed the account to user, and then executes the command to change it back to the original user.
Eg:
The
Bashif [-n] $BASH _version "]; Then # include. BASHRC if it exists if [-F ' $HOME/.BASHRC "]; then . "$HOME/.BASHRC" fifi# set PATH so it includes user ' s private bin if it existsif [-d ' $HOME/bin "] and then path=" $H Ome/bin: $PATH "fiLogin Shell Read the configuration process (from:Non-login Shell (bash) at login, only read the configuration file: ~/.BASHRC. BASHRC This file sometimes does not exist, it needs to be created by itself, it can be personalized customization,
Article Title: Linux limits users to switch from SU to other users. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source. If you do not want some people to use the "su" command to become root or switch to another user, in the "/etc/pam. d/
Troubleshooting of Logon failures when su switches to sqlplus in Oracle, oraclesqlplusProblem description:The oracle database in the production environment suddenly fails to log on, and the oracle database in the rlwrap production environment suddenly fails to log on. rlwrap sqlplus "/as sysdba" reports the following error: rlwrap[Oracle @ localhost root] $ rlwrap sqlplus "/as sysdba"Rlwrap: warning: your $ TERM is 'xtermin' but rlwrap couldn't find i
Linux login non-login shell and su, sudo related concepts, linuxlogin1. login non-login shell
In Linux, the kernel will create the init process to perform a series of system initialization operations. When a user logs on to the shell, the related logon configuration files are read from both the pseudo-terminal Logon: ssh, the X11 console, and the tty console. Linux has two types of Logon shells: login and nologin:
Login shell: Required for shell l
Because the root user has full operation permissions on the system, in order to avoid some mistakes, we recommend that you log on to the system as a general user. if necessary, you need root operation permissions, then, run the "su-" command to log on as the root user. Generally, you can log on as the root user to configure the system as administrator by executing the "su-" command and entering the correct
The difference between Su and sudo is not clear, and it is often compiled recently.ProgramAnd now I want to write down the differences between them and learn from them.
Difference between Su and sudo:1. Commonalities: root user permissions;2. Differences: su only obtains the root permission, and the work environment remains unchanged. The user's work environment
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 (without a password), as shown below:
[root@lx200 ~]# su - oracle[oracle@lx200 ~ ]$ If your current identity is not root (a common user) and you want to switch to root
#id/whoami View Current userSU Switch User#su-username"-" function, plus after initializing the various environment variables of the current userSwitch environment variables. No-change the past, the directory will not change, the path will not changeComparisons are as follows:Su aming123[Email protected] root]$ pwd/root[Email protected] root]$ echo $PATH/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin[[email protected] root]$ lsL
Tags: ROC service Relationship General hints Complex add ADO workRoot users have the supremacy of the right, then our OPS personnel is not directly under the root user to deal with all problems? The answer is no, the greater the power, the greater the responsibility, the person will be wrong, so we have to do without prejudice to our work, as far as possible to limit our power, so as to avoid accidental operation caused disasterOne-su command---switch
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 "su-" command to log on as the root user, users in other groups cannot Log On As root
The su command is used to switch between users, either from a common user to a root user or from a root user to a common user. When a common user switches to a root user, the authentication password is required. In ubuntu, when a user switches from a common user to a root user for the first time, the system will prompt that the su authentication fails. The solution is as follows:
◆ The
Solution to su authentication failureAfter Ubuntu is installed, the root user is locked by default and cannot log on or "Su"Root. Some people say this is a bad practice, especially for servers. I think it should be more secure for desktop users, but it can be set to "allow Su" for servers.To root, but root users are not allowed to log on directly ". For the conve
Su [-FMP] [-C command] [-s shell] [-- help] [-- version] [-] [user [Arg]-C command: the user who changed the account to user, and then executes the command to change it back to the original user.What is the difference between the su command and the Su-command in Linux?Su username is switched to another user, but does n
One, the SU commandThere are some things in the Linux system that can only be done by the root user, the normal user cannot do it, and then it is necessary to temporarily switch to root.[Email protected] ~]# WhoAmIRoot[Email protected] ~]# su davery[Email protected] root]$[Email protected] root]$ pwd/root[Email protected] root]$[Email protected] ~]# su-daveryLa
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.