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

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

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

Post by harrywangca » 2019/05/08 15:52:22

I see in CentOS 6, if from GUI I log in as root then switch to another non-user like Ayda, then log out Ayda it will go back to root user space directly without any prompt to enter root passwd. But if I didn't log out Ayda, it will prompt me to choose user and input pass word to log in. But in CentOS 7,
I see whatever I switch or log out Ayda, it will prompt me to enter root password to log in.

My prefer is like that in CentOS 7, but I am not sure where to configure it, any help? please.

Thanks.

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/05/14 21:17:25

Any help? Please

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/15 04:13:03

You should not log into the GUI as root. There is no reason to do this.

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/05/16 16:46:59

Thank you Whoever for reply. My question is: boot up the machine and log in as root to do configuration, after that from graphic switch to non-root user and do some other works and test. After finish test under non-root user. At this time I log out this non-root user, I thought it will go back to login screen, but it does not. When I log out non-root user, it directly go back to root context.

Question: why it does not show up log in screen when I log out this non-root user? And how to configure it to show log in screen all the ways when I log out non-root user?

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/05/16 16:59:45

You know the keyring caches credentials for an amount of time for your convience, right?
Well that's what looks like is happening here.
Knowing that, why would you login as root, that's insane, and the opposite of what is intended.

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/05/17 15:52:18

Thanks aks. The case is I have to log in as root and get permission to do configuration and switch to non-root user to test the configuration.
It looks like something related PAM with gnome-keyring, but I am not sure where to configure it. Thanks.

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/05/17 16:09:54

Login as non-root
Elevate to root to do the thing(s)
Back "down" to non root to test.

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/05/17 16:29:21

I see. the thing is: gnome terminal, xterm.... many of GUI settings....etc. are under requirements to be disabled to non-root users. Based on this only can be logged in to do configuration under roo and switch to non-root user to verify the configuration works or not.

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/19 05:10:15

You don't need to log into the desktop GUI in order to run any program as root.

Start by logging in as a normal user, then use sudo (needs configuration) or su to get root privileges to run the program.

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/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.

Question: when I log in as root then switch to non-root user and log out of non-root user, At this time I expect it will show log in background to me to choose user?

But actually when I log out non-root user, it does not show log in background to me, it goese to root context as my previous login. This happened in CentOS 6.

In CentOS 7, when I log in as root and switch to another non-root user and log out this non-root user, this time it will show me login background to choose other than that in CentOS 6 it directly goes to root context(space)

Post Reply