LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   ~Current: User can't log into X on New install (https://www.linuxquestions.org/questions/slackware-installation-40/%7Ecurrent-user-cant-log-into-x-on-new-install-4175732321/)

business_kid 12-31-2023 01:44 PM

~Current: User can't log into X on New install
 
With the ups & downs, I started over with a new install of current while this was easy. Installed a user with
Code:

useradd -g user <name>
and then gave the new user a password.

But I can't log into runlevel 4 with the new user. I can log into a runlevel 3 console, but I can only use X as root. Any ideas?

Petri Kaukasoina 12-31-2023 01:59 PM

There is no group 'user'.

Try to add another user using the adduser script (not useradd). When it asks about supplementary groups, it tells you to press UP to use a list of selected groups.

Windu 12-31-2023 02:39 PM

Quote:

Originally Posted by business_kid (Post 6473848)
With the ups & downs, I started over with a new install of current while this was easy. Installed a user with
Code:

useradd -g user <name>
and then gave the new user a password.

But I can't log into runlevel 4 with the new user. I can log into a runlevel 3 console, but I can only use X as root. Any ideas?

My guess is that the user needs an existing homedirectory if the runlevel is 4 (graphical login). If you login at the console without having a homedir, you end up in the '/' directory if my memory serves me well, but that's different in runlevel 4.

The "useradd" command will not create a homedirectory even if that directory does not yet exist, unless you specify the "-m" parameter to useradd. The Slackware interactive script "adduser" uses that "-m" parameter; use adduser instead of useradd like Petri already recommended!

business_kid 01-01-2024 09:06 AM

Thanks guys - sorted. I actually did
Code:

useradd -g users <name>
but forgot to make the homedir initially, and forgot to chown it to luser:group. So my user had no write permissions:redface:

That's what I get for working on 2 PCs simultaneously. I don't multitask well.

rkelsen 01-03-2024 07:46 PM

+ 1 more for using the 'adduser' script. It does everything you need.

Didier Spaier 01-04-2024 04:14 AM

Quote:

Originally Posted by rkelsen (Post 6474444)
+ 1 more for using the 'adduser' script. It does everything you need.

I use usersetup or gtkusersetup from salix-tools and salix-tools-gtk respectively:
https://github.com/gapan/salixtools
https://github.com/gapan/salixtools-gtk

business_kid 01-04-2024 06:04 AM

Quote:

Originally Posted by Didier Spaier
+ 1 more for using the 'adduser' script. It does everything you need.

adduser - I didn't know about that. Why not run it automatically on 1st boot?

rkelsen 01-04-2024 06:35 AM

Slackware doesn't hold your hand, that's why it doesn't run automatically.

Patrick specifically mentions the adduser command in this document, which is in the root directory of your installation media: http://slackware.uk/absolute/snapshot/Slackware-HOWTO

business_kid 01-04-2024 09:32 AM

I'll consider myself duly nagged and told off.:redface:

Mind you, having a non-writable homedir wasn't very bright either. Perhaps I'm just too honest:D


All times are GMT -5. The time now is 07:45 AM.