Log out og non-root user back to root without login screen

General support questions
Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Log out og non-root user back to root without login screen

Post by Whoever » 2019/05/21 06:19:50

harrywangca wrote:
2019/05/20 16:51:44
As logging in as other user and using su or command sudo to issue command with root privilege. In the machine all the gnome terminal and xterm are disabled not to use under requirement. The only thing is log in as root with it as my previous post said.
So log in via SSH with the X display set to tunnel back to your desktop. Or create a non-privileged user and provide an exception to that user to allow the appropriate programs to be run, just like you do for root.

Whatever you are trying to do to lock down these machines, it probably won't work. It won't be secure.

harrywangca
Posts: 107
Joined: 2016/01/12 23:27:04
Location: Vista California

Re: Log out og non-root user back to root without login screen

Post by harrywangca » 2019/08/21 15:45:38

Thank you whoever for tour reply.

My issue is:

CentOS 6,
1. Logged in as root, opened a terminal.
2. switch to a non-root user, then logged out this non-root user.
3. After step 2, then it goes to root context with a terminal like in step 1.

Question: After step 2, I expect it will show log-in screen to me to prompt to input password and then log in. But it directly goes to root context in step 1. It skipped the login screen. How to configure to show login screen after step 2?

Thank you

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Log out og non-root user back to root without login screen

Post by aks » 2019/08/21 18:28:41

So there's quite a difference between (say)
su
and
su -
One inherts the environment the other starts a new.
Environmental variables are quite useful in X11.
The truly big problem with starting an X session as root is that: the WHOLE session is root - not a "normal" user.
Anyway that's all hints, think about it (and read them man pages).

Post Reply