LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64
User Name
Password
slarm64 This forum is for the discussion of slarm64.

Notices


Reply
  Search this Thread
Old 01-18-2022, 06:07 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
User & password Problems


To avoid continuing the old thread (Getting ssd booting…), we'll deal here with password problems. The image I'm using is:
slarm64-current-aarch64-xfce-raspberry_pi_4-5.15.5-build-20211128.img
from November 2020.

I have not been able to get a user's password set at all in Slarm64. Comparing with a PC Slackware64 install, I found user entries were not getting added to /etc/passwd, or /etc/passwd-. I manually edited those as root, pasted in from my pc a line from /etc/passwd, changed the user password using the root account, and I was able to log in to agetty consoles.

To get into X, I had to:remove lightdm-chooser from /etc/pam.d/; change /etc/inittab from runlevel 4 to runlevel 3; Then log in at the prompt, and run 'startx.'

Also worth noting is that the user's home dir is not created. Further, a user doesn't have permission to make it, so I had to do that with root with a separate command, and then change perms on it.

When it comes to password stuff, I'm clueless. I'm conscious that both of those solutions are workarounds, not fixes. I feel a review of that password stuff in needed, however. I can't be of much help because my expertise is in electronic hardware, not software.
 
Old 01-18-2022, 06:36 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
If you have to edit passwd, shadow or groups manually, use vipw and vigr. They work like visudo, creating a temporary file to hold the edited text and checking for correct syntax before copying it over.
 
Old 01-18-2022, 12:00 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Thanks Hazel,

It appears I was able to fool the password stuff, but I am pretty clueless about pam which slackware has added now. But I'm not out to reinvent or develop Slarm64, that's not my field.

It looks to me like an OS issue with Slarm64. I installed a binary image, which should work out of the box, but doesn't. There are some Arm-specific patches required to get things compiled. It looked to me like the 'useradd' program should have the sticky bit set, but it doesn't need that in the x86_64 version. But a RazPi is not an X86_64 compatible - it's an sbc in an SoC or two.
 
Old 01-18-2022, 12:07 PM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
You don't happen to have the saved contents of /etc/pam.d/lightdm-chooser, do you? I might be able to interpret it for you.
 
Old 01-18-2022, 12:37 PM   #5
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,907

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
To avoid continuing the old thread (Getting ssd booting…), we'll deal here with password problems. The image I'm using is:
slarm64-current-aarch64-xfce-raspberry_pi_4-5.15.5-build-20211128.img
from November 2020.

I have not been able to get a user's password set at all in Slarm64. Comparing with a PC Slackware64 install, I found user entries were not getting added to /etc/passwd, or /etc/passwd-. I manually edited those as root, pasted in from my pc a line from /etc/passwd, changed the user password using the root account, and I was able to log in to agetty consoles.

To get into X, I had to:remove lightdm-chooser from /etc/pam.d/; change /etc/inittab from runlevel 4 to runlevel 3; Then log in at the prompt, and run 'startx.'

Also worth noting is that the user's home dir is not created. Further, a user doesn't have permission to make it, so I had to do that with root with a separate command, and then change perms on it.

When it comes to password stuff, I'm clueless. I'm conscious that both of those solutions are workarounds, not fixes. I feel a review of that password stuff in needed, however. I can't be of much help because my expertise is in electronic hardware, not software.
after boot there is a single root user and password is set on first login in both kosol and lighthdm. field from the root user you create any user and configure it as you need it.
 
Old 01-18-2022, 12:59 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Lightdm-autologin looks like this
Code:
#%PAM-1.0

# Block login if they are globally disabled
auth      required pam_nologin.so

# Load environment from /etc/environment and ~/.pam_environment
auth      required pam_env.so

# Allow access without authentication
auth      required pam_permit.so

# Stop autologin if account requires action
account   required pam_unix.so

# Can't change password
password  required pam_deny.so

# Setup session
session   required pam_unix.so
From my POV, I've got a functional system, and reported back what I had to do to get it working. It's over to others now. There's still a password required on login to X, and to unlock the screensaver. If this is patched I'll test it. I'd like not to have passwords, but that's not the fault of a file I hid from the system!

Anyhow this reply comes to you courtesy of my RazPi as a user in X under firefox, so I'm happy as a pig in s***, as the farmers say.

Last edited by business_kid; 01-18-2022 at 01:22 PM.
 
Old 01-18-2022, 02:00 PM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Quote:
Originally Posted by business_kid View Post
Lightdm-autologin looks like this
# Block login if they are globally disabled
auth required pam_nologin.so
That one just stops logins when root has disabled them because of system work
Quote:
# Load environment from /etc/environment and ~/.pam_environment
auth required pam_env.so
Sets the environment. I doubt if that would cause problems.
Quote:
# Allow access without authentication
auth required pam_permit.so
That's supposed to allow autologins. But the man page says it can cause problems in other modules if the display manager doesn't provide a user name.
Quote:
# Stop autologin if account requires action
account required pam_unix.so
pam_unix is the module that checks the passwd and shadow files. It's one of the oldest pam modules so unlikely to be the culprit here.
Quote:
# Can't change password
password required pam_deny.so
Well, that shouldn't cause problems
Quote:
# Setup session
session required pam_unix.so
Ditto.

Looks like pam_permit is the most likely culprit. I hate autologins anyway. What on earth is the point of having passwords if any Tom, Dick or Harry can just barge in without one?
 
Old 01-23-2022, 06:08 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Just coming back on this:
Quote:
after boot there is a single root user and password is set on first login in both kosol and lighthdm. field from the root user you create any user and configure it as you need it.
That's the theory. But if it worked here, I wouldn't be posting about password issues.

I'm marking this solved. It's actually worked around, because /etc/passw* is not getting user entries when I add a user/set it's passwd with root. I worked around by pasdting a line in, then changing the passwd on that.

I've gone to runlevel 3 in /etc/inittab, where I can log in as a user (hooray!) Then run startx.

Likewise I disabled all the paranoid stuff, because this RazPi is a media box hung out of my tv. Security is an irritation there, and the software's backed up as of last night. I mean to try going straight to runlevel 4 again sometime, but I reboot it so rarely, it's gone on the long finger.

EDIT: I returned to runlevel 4 by default, and all is as desired.

Last edited by business_kid; 01-23-2022 at 07:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a user with no password/or user pick password. knockout_artist Linux - Newbie 2 11-26-2007 09:08 AM
AOL UK && BT Voyager 100 && Slackware 10.2 && RP-PPPoE pitt0071 Linux - Networking 3 01-17-2006 06:10 AM
Japanese canna won't work : Warning: かな漢字変&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration