LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   4MLinux (https://www.linuxquestions.org/questions/4mlinux-115/)
-   -   How should I logout? (from 'root' acct > into new created standard 'user') (https://www.linuxquestions.org/questions/4mlinux-115/how-should-i-logout-from-root-acct-into-new-created-standard-user-4175688044/)

4ML220 01-05-2021 10:56 AM

How should I logout? (from 'root' acct > into new created standard 'user')
 
Hi guys, after instalation 4Mlinux v34.2 to PC hdd and restarts and setting root paswd and a few settings > then I've followed web-site original instructions to create standard new 'user' & paswd > and after that I should log-out from root and log-in into standard user.


Q1:
But how can I log-out from this root acct and get into 'user'?
The JWM start menu doesn't have logout button & using some commands did not help logout:

logoff
logout
session-logout
CTRL+D
exit
gnome-session-quit --force
gnome-session-save --kill
pkill -KILL -u root
sudo pkill -u root
sudo pkill -KILL -u root

Neither restart works - 4MLinux just restart & log straight into 'root' acct again & again ...
I used also the Menu > JWM exit > so it exit into black command screen > I used command logout > then try login again as 'user' > enter passw > controll command 'whoami' says 'user' > but it's not letting use command 'startx' - there's always answer:
killall: can't kill pid XXX: Operation not permited

Is there please any way how to do it? How to log in and use allways standard acct. 'user' instead of 'root' in 4MLinux.
Thank you.


Q2:
So it looks like I will have to wipe it out of my hdd and try to do clear reinstall.
What is the proper way to install & create 7 use acct. 'user'?
1. install linux with create root > set root > install all sw & everything settings as 'root' > then create 'user' acct > log into 'user' > use 'user'?
or
2. install linux with create root > set root > create 'user' acct. right away > log into 'user' > install all sw & everything settings as 'user' > use 'user'?
or
3. install linux with create root > set root > create 'user' acct right away > stay into 'root' > install all sw & everything setiings as 'root' > then log into 'user' > use 'user'?


Q3:
And how to make 4MLinux to start pc automatic into 'user' (not into 'root')?

era31415 01-05-2021 04:58 PM

I think you might get what you want with:
Quote:

exec su - user
exec replaces the current process with a new one described in its arguments
the new command overlays the current shell without spawning a new process.

Since the pid (Process Identity does not change then the new command replaces without
remembering the old process, including the root ID it was running with, everything run from that point on will be the new user you have named because the su Set User runs its arguments as user.

The - tells su to set up and run the login sequence.

As user. The default if no user is named is root.

Enjoy your Explorations!

hazel 01-06-2021 04:49 AM

Why don't you just reboot? That's what most people do after installing.

Merlin2 01-06-2021 12:05 PM

Shut down remove power
 
If your computer has a UEFI BIOS, you MUST Power off to obtain a clean reboot. Rebooting with many UEFI firmware versions DOES NOT perform a clean warm re-boot. I suggest you log off and remove the power cord from your computer. Then wait at least ten seconds before replacing the power cord. Remember the original IBM PC power supply was designed to retain power for at least ten seconds

Good Luck

hazel 01-06-2021 12:57 PM

Quote:

Originally Posted by Merlin2 (Post 6204758)
Rebooting with many UEFI firmware versions DOES NOT perform a clean warm re-boot.

I wonder if that's what is stopping my Lenovo Thinkstation from rebooting. istr it did reboot when I first got it a couple of years ago, but it doesn't now unless I briefly switch off and on again.

Merlin2 01-06-2021 02:03 PM

A simple way to find out that works for me is:Ii hold down the left SHIFT key when I click on shutdown OR reboot. Works every time on my Lenovo ThinkCenter with Linux or Windows 10. Sometimes shutdown and reboot do not give me a clean reboot if I forget to hold down the LEFT SHIFT key. Then I must remove the power cord. Aa far as i can tell the UEFI firmware seems to be designed to keep a minimum power state to the motherboard and retain the previous boot parameters.
M

zk1234 01-07-2021 12:06 PM

Hi,

https://www.linuxquestions.org/quest...me-4175553243/
https://www.linuxquestions.org/quest...er-4175581471/

The "logout" command should work unless you disabled it here:
https://www.linuxquestions.org/quest...in-4175686492/

.

hazel 01-08-2021 04:21 AM

Quote:

Originally Posted by Merlin2 (Post 6204791)
A simple way to find out that works for me is:Ii hold down the left SHIFT key when I click on shutdown OR reboot. Works every time on my Lenovo ThinkCenter with Linux or Windows 10.
M

I tried that last night, keeping the left shift down through shutdown and into restart. It still froze on me after completing the POST. It always freezes either there (where UEFI is supposed to hand over to the bootloader) or later where the bootloader is supposed to hand over to the kernel. But unlike you, I can always unfreeze it by flicking the wall switch. I've never had to unplug it.

4ML220 08-25-2021 06:55 AM

OK, thank you guys a lot for your help.
After a few months of trying now I know that I did read the manual of 4MLinux wrong:
There is an instruction "... recommended to not create regular user account ..." following with instructions how to create regular user account.
So I did not see the word "NOT" and followed it ...
Sorry about it.

This thread can be closed now.


All times are GMT -5. The time now is 09:38 AM.