You are not logged in.

#1 2012-08-25 00:57:46

Noxic
Member
Registered: 2010-04-26
Posts: 18

[SOLVED] Sudo & physical login not working, but SSH login works.

I almost only access my arch-linux computer through SSH, and recently made a long-overdue update, and had to "replace" /lib with /usr/lib as described here due to glibc file conflicts (among others). I simply moved everything inside /lib to /usr/lib (which left me unable to use any command but "cd"), and then used a liveCD to make a symlink from /lib to /usr/lib. Afterwards, I was having even more file conflicts (but none with glibc) but deemed it safe to use pacman --force, which seemed to work smoothly.

That is, until I tried to sudo su into root again. Sudo claims that I'm entering an incorrect password, but still I'm able to login using that same password (but not using an incorrect one). Apparently sudo was updated, so I used a liveCD again to replace the old sudoers file with the new one. When I started the computer, I noticed that I was unable to log in through the physical terminal; After typing in my username, it emptied the screen and asked for login again.

My main concern at the moment is Sudo; Without it, I have to use the liveCD to gain root access since I disabled login for root. Not having physical login isn't that big of a problem as long as its internet connection is working, but when it doesn't, it will be quite a huge problem. It's been a long time since I tampered with linux configurations and I've forgotten most of how these things work, so I'm going to need a little help to atleast re-enable root login using the liveCD. Any help beyond that would also be appreciated since I frankly have no idea why sudo won't accept my password, and even less why I can't log in physically.

Last edited by Noxic (2012-08-26 00:49:21)

Offline

#2 2012-08-25 01:52:52

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

So when you say "as described here", you don't actually mean that you followed the instructions? Instead, you ignored them, used --force which is almost guaranteed to break your system and now are surprised that things don't work as they should?!

Is the system now up to date? Are there unowned files in /usr/lib/?

Which new file did you replace the sudoers file with exactly? What differences are there between the two? (You did keep a backup of the previous one, right?)

Have you dealt appropriately with all new .pacnew, .pacsave files etc.?

The wiki explains how to disable root login - I suggest reversing the instructions found there. https://wiki.archlinux.org/index.php/Su … root_login

Note, too, that a "long overdue update" is also almost certain to cause problems. You need to keep the system up to date for Arch to work smoothly. If this isn't a good option, pick a distro which isn't rolling release for that machine.

Have you worked your way through the news on the home page systematically dealing with all the changes you need to make?

Last edited by cfr (2012-08-25 01:55:32)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-08-25 02:10:32

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

Sounds like you nuked /etc/pam.d/login and /etc/pam.d/other. I suggest you stop doing upgrades with --force.

Offline

#4 2012-08-25 02:24:47

Noxic
Member
Registered: 2010-04-26
Posts: 18

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

I meant that I was having the problem described in the link, and I only used --force after fixing the problem described in that link (replacing /lib with a link to /usr/lib and updating glibc). I used --force after everything from /lib was in /usr/lib, and after updating glibc.

The system is up to date now, yes. Only one file in /usr/lib is unowned (llibpython3.so), but pacman "cannot determine ownership" of several directories. Should I list them?

I moved sudoers to sudoers.pacold, and moved sudoers.pacnew to sudoers. Apparently the 'wheels' group was no longer allowed sudo access, I hadn't noticed that before. I fixed it now, which enables me to sudo su into root again. Other than that, there is no real difference between them; The new file offers more documentation and customization regarding logging and a few other things, but everything is commented out by default.

I haven't dealt with all new .pacnew and .pacsave files, frankly I haven't thought of trying until I fix the sudo problem since the only .pacnew files I have are for php.ini, the pacman mirrorlist and a few other less important configuration files.

Thanks for the quick reply, the bigger of the problems is fixed now smile I'd still like some help with the physical login though, it worries me a lot.

EDIT: @falconindy - Oops, you replied before I posted my answer x) Looks like you were right, not /etc/pam.d/login nor /etc/pam.d/other exists, but a /etc/pam.d/login.pacnew apparently did. I must have missed it in the list of messages concerning 287 updates. Since no pam.d/login file existed, I just renamed pam.d/login.pacnew into pam.d/login. How do I generate a "other" file? Can I copy one from someone and edit it according to my system?

EDIT: Also, my first "fix" to the sudoers file enabled the "wheel" group to use sudo without a password prompt. Re-enabling the password prompt borked things again, but it's still a step forward.

Last edited by Noxic (2012-08-25 02:35:06)

Offline

#5 2012-08-25 02:34:36

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

Noxic wrote:

I used --force after everything from /lib was in /usr/lib, and after updating glibc.

Do. Not. Use. --force.

Reinstall pambase. I suggest you run 'pacman -Qkq' to find out what other files are missing from your botched upgrade.

Offline

#6 2012-08-25 02:38:25

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

The instructions didn't recommend moving everything in /lib to /usr/lib. Nor creating the symlink manually.

You should NEVER use --force unless (a) you want to break your system (it is quite good for that as you see) or (b) you are told by somebody reliable to use it to upgrade *a specific package* or (c) you know exactly what you are doing and so are yourself a reliable advisor. You should NEVER, for example, do "pacman -Syu --force". Just for example.

You should deal with the unowned directories as recommended in the wiki, yes.

libpython3.so should be owned by python. No idea about llibpython3.so.

If you don't merge .pacnew and .pacsave files correctly, of course your system will break. Please read the wiki on this. The way you dealt with the sudoers file shows that you clearly don't understand what you are doing. You replaced your configured sudoers file with the default one and were then surprised sudo stopped working. If you understood how pacman worked, that would not be a surprise.

https://wiki.archlinux.org/index.php/Pa … save_Files

Last edited by cfr (2012-08-25 02:41:00)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2012-08-25 02:59:41

Noxic
Member
Registered: 2010-04-26
Posts: 18

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

Very well, I'll never use --force on my own initiative. Reading about what the change meant on the link I provided made me assume that the only difference was files from /lib being in /usr/lib, and /lib being symlinked to /usr/lib. Every other source of information dealt with various other scenarios where glibc was the only conflicting package, and ignoring it (along with curl as suggested on the wiki page) would pretty much solve the problem. For some reason, when I ignored glibc, pacman refused to update any package at all. I can't recall the exact error message, but only because it didn't specify any reason for the error. That's what led me to move everything in /lib to /usr/lib and create the symlink manually.

The reason I didn't look closely at the sudoers file was because I thought the "wheel" group was allowed sudo access by default, of course I would have changed it if I knew otherwise. Like I said, it was long ago since I did anything like this in linux.

pacman -Qk listed missing files from hwids and util-linux. From what I can tell by that, it looks like I've been lucky to be able to boot at all.

EDIT: Well, everything seems to work as it should now. Thanks for your help, especially for answering so quickly smile I was worried it would take much longer to fix.

Last edited by Noxic (2012-08-25 03:06:52)

Offline

#8 2012-08-25 14:35:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: [SOLVED] Sudo & physical login not working, but SSH login works.

Glad you got it fixed. I'm sure you'll be more cautious next time since you realise you've got off fairly lightly this time smile.

Please remember to mark this thread [SOLVED]. Thanks.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB