Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#62208 - Non-root users are unable to login in a fresh install

Attached to Project: Arch Linux
Opened by Vasanth Srivatsa (vasanthddeveloper) - Monday, 01 April 2019, 15:31 GMT
Last edited by Antonio Rojas (arojas) - Monday, 08 April 2019, 08:50 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To No-one
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hello, I have been installing Arch Linux for at least 3 times a day from the last month. From a few days, no non-root user created during the fresh installation is able to log in. Trying to login with a non-root user in tty says: incorrect password.

Here are the commands I have used to create a non-root user once I have finished installation of Arch Linux:

useradd -m -g users -G wheel -s /usr/bin/bash vasanth
echo "vasanth:password" | chpasswd

Note: This is my first bug report.
Thank You :)
This task depends upon

Closed by  Antonio Rojas (arojas)
Monday, 08 April 2019, 08:50 GMT
Reason for closing:  Not a bug
Comment by Santiago Torres (sangy) - Monday, 01 April 2019, 16:22 GMT
Hi Vasanth, care to share any information on the syslog regarding authentication requests from PAM? Likewise, care to share the /etc/passwd entry (with a known password) to see if there's something weird there...
Comment by Vasanth Srivatsa (vasanthddeveloper) - Monday, 01 April 2019, 18:08 GMT
As I have never faced such a problem, I don't know how to only get the relevant entries from journalctl.
Here are the files required:
1. Passwd File: https://pastebin.com/PD4XZefG
2. Shadow File: https://pastebin.com/7F9GZU30
3. Complete Output From journalctl: https://pastebin.com/jeQaUJUi
Comment by Terry Tibbles (terry_tibbles) - Tuesday, 02 April 2019, 02:47 GMT
This should probably be posted on the forum, and is certainly not a 'critical' bug.

Have you looked at the wiki for information on how to create new users?

https://wiki.archlinux.org/index.php/Users_and_groups#User_management
Comment by Vasanth Srivatsa (vasanthddeveloper) - Tuesday, 02 April 2019, 06:30 GMT
With polite respect to Terry Tibbles, a freshly pacstrapped Arch installation does not allow any non-root users to log in. This should be a critical issue because the operating system is non-operational. And, even after giving you the exact commands with which I have created an account, why do you think I haven't looked at the wiki? I install Arch Linux at least 3 times a day. And have completed more than a 100 Arch Linux installs this month. Also, can you give me a reason, why this is not the correct place to post a bug report?

I have been conducting testings on Virtual Box, and real hardware as well. And none work.
Comment by jb (jb.1234abcd) - Tuesday, 02 April 2019, 20:07 GMT
Vasanth,
please follow instructions:
https://wiki.archlinux.org/index.php/Users_and_groups#User_management
"Warning: In order to be able to log in, the login shell must be one of those listed in /etc/shells, otherwise the PAM module pam_shell will deny the login request. In particular, do not use the /usr/bin/bash path instead of /bin/bash, unless it is properly configured in /etc/shells."

My Arch installation shows:
$ cat /etc/shells
# Pathnames of valid login shells.
# See shells(5) for details.
/bin/sh
/bin/bash


Comment by Vasanth Srivatsa (vasanthddeveloper) - Wednesday, 03 April 2019, 18:11 GMT
Hello jb, thank you for giving me a reply, but I have already checked if there is a valid shell on my non-root user account. Also, in the command given at the main content of the thread I have specified "/usr/bin/bash" by using the -s argument to useradd command.
Comment by loqs (loqs) - Wednesday, 03 April 2019, 18:50 GMT
/usr/bin/bash is not by default in /etc/shells. Did you add it to /etc/shells? Did you test a user without specifying -s or with -s /bin/bash ?
Comment by Vasanth Srivatsa (vasanthddeveloper) - Saturday, 06 April 2019, 11:18 GMT
Yes, I checked creating a user without -s to see if it works, but it does not. It still says the password is incorrect.
Comment by Vasanth Srivatsa (vasanthddeveloper) - Monday, 08 April 2019, 08:05 GMT
So, I finally solved the issue. While creating the account the shell is being set as "/usr/bin/bash" which is rejecting any login attempts. Setting the shell to "/bin/bash" is fixing the issue. Thank you so much to all of the above people who responded and given me suggestions. I sincerely apologize, for this mistake. Finally, Erik Dubois who is the developer of ArcoLinux pointed this mistake out.

But I still wonder why "/usr/bin/bash" is not accepted, and "/bin/bash" is being accepted. I noticed that /bin and /sbin are symbolic links to "/usr/bin".

Loading...