You are not logged in.

#1 2013-10-08 22:33:10

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Can't log in as anything other than root

Recently I installed Arch linux on my laptop.  Had a few problems with the install but I got there eventually.

I have installed gnome and lxde which I am using now with the log in manager that came with gnome.
Before I was using gnome/lxde I just logged in from the default login screen, and ran startx to load the x window manager and from there I would type startxfce4 to get into xfce.  All seems to go well on the root account, however, when I created a new user with

I added a new non-root user with useradd and all went well with no complaints.  I set up a password for it too.
When I logged out of root and tried to log in as my non-root user it said something like

"timed out locking in authority file" - not sure the exact words.

one time it loaded x window manager (but could not load xfce4) but since then it has loaded a black screen with nothing on it.  After installing gnome and lxde and using the gnome login manager, my new user shows up on the login menu, however, when trying to log in to lxde it loads into the DE but a popup says: "Error:  Invalid Directory" (or something like that).  No applications are in the menu and all other buttons are unresponsive, had to reboot.
I Can not log in to any usable DE at this stage.  I can only successfully log into non-root accounts using the default arch login screen (which i no longer am using). 

I do have access to a live version of arch.
I really want to get this fixed as not only is it bad practice to run under root all the time, but many applications won't run as root.

Any help would be much appreciated, but I'm new to this so you're probably going to have to be quite detailed; I came from Linux Mint 12 which kinda did everything for me.

Offline

#2 2013-10-08 22:41:11

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: Can't log in as anything other than root

Did you create a home directory for the user, and are the permissions correct on it?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2013-10-08 22:49:50

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

Well a folder is there under the users name in /home/dylan , so i assume so.  I'm not sure about the permissions, how do I check?

EDIT:  the only folder inside /home/dylan is .bash_profile

Last edited by KiwiLinux (2013-10-08 22:51:16)

Offline

#4 2013-10-08 22:56:03

cookies
Member
Registered: 2013-01-17
Posts: 253

Re: Can't log in as anything other than root

ls -l /home

should tell you what you need.

Oh, and .bash_profile is a file, not a folder.

Offline

#5 2013-10-08 23:05:03

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

Output of ls -l /home/ is:

drwxr-xr-x 2 root root     16384 Oct  9 10:47 dylan

Still fairly clueless as to what I am to do with this info, this is a steep learning curve but I'm gonna stick at it haha smile

Offline

#6 2013-10-08 23:10:05

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

Re: Can't log in as anything other than root

KiwiLinux wrote:

Output of ls -l /home/ is:

drwxr-xr-x 2 root root     16384 Oct  9 10:47 dylan

Still fairly clueless as to what I am to do with this info, this is a steep learning curve but I'm gonna stick at it haha smile

So the problem is that your home directory is owned by root rather than you. To change that:

# chown -R dylan:users /home/dylan

Assuming your username is dylan.
You may also want to change the permissions. Something like:

# chmod 700 /home/dylan

would match mine but I'm not certain what the defaults are. (I know the ownership above will get you the defaults, which isn't what I use. But I can't remember if I changed the permissions from the defaults or not.)

This will solve the immediate problem. However, this stuff is important so you should read https://wiki.archlinux.org/index.php/Permissions to get up to speed.


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 2013-10-08 23:10:57

BishopBlade
Member
Registered: 2013-07-11
Posts: 16

Re: Can't log in as anything other than root

Your home directory is owned by root and belongs to the root group, so your user account will not be able to write to the home directory. Change the owner of your homedir to your user and group to "users" and you should be good smile

Edit: Ninja'd. But yeah, you should definitely check out that wiki page if you plan to start editing more of your system files.

Last edited by BishopBlade (2013-10-08 23:13:52)

Offline

#8 2013-10-08 23:13:16

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

When I run the chown command as you said I get an error saying operation not permitted.  I'm logged in as root.

Offline

#9 2013-10-08 23:20:47

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

Re: Can't log in as anything other than root

Can you post the output of

ls -al /home

?

EDIT: Also:

grep dylan /etc/passwd
grep users /etc/group

EDIT EDIT: On the off chance one of those commands includes your phone number, say, delete that bit before posting here. Obviously.

Last edited by cfr (2013-10-08 23:23:41)


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

#10 2013-10-08 23:23:24

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

output of ls -al /home/

drwxr-xr-x  5 root root     16384 Jan  1  1970 .
drwxr-xr-x 18 root root      4096 Oct  9 00:34 ..
-rwxr-xr-x  1 root root 554696704 Oct  8 18:52 archlinux-2013.10.01-dual.iso
drwxr-xr-x  3 root root     16384 Oct  9 08:01 development
drwxr-xr-x  2 root root     16384 Oct  9 02:00 dylan

there's some other random files and things stored there..

Offline

#11 2013-10-08 23:26:50

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

Re: Can't log in as anything other than root

See edit above. Do you know why one of those dates is 1970?

What file system are you using?

EDIT: I ask because those 16384s look wrong...

Last edited by cfr (2013-10-08 23:28:17)


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

#12 2013-10-08 23:32:19

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

grep dylan /etc/passwd
dylan:x:1000:100:Dylan,home:/home/dylan:/bin/bash

grep users /etc/group
users:x:100:

Not sure why it says 1970, could be something to do with the time?  I read somewhere that the time is calculated by counting the seconds from 1970..?  Just a stab in the dark

EDIT:  Filesystem is ext4 for my arch install, but I believe i have a drive mounted in home or something like that which was in FAT32

Last edited by KiwiLinux (2013-10-08 23:33:12)

Offline

#13 2013-10-08 23:35:43

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

Re: Can't log in as anything other than root

So for some reason your user doesn't seem to actually be in the users group? You can add yourself:

# usermod -a -G users dylan

But I am worried about why these errors are occurring. How exactly did you add the user in the first place? That is, what command exactly did you run?


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

#14 2013-10-08 23:39:28

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

Adding dylan to the users group ran without error, what now?  Am I done or do I still need to modify some permissions and things?

As far as I know I ran the useradd example from the wiki and changed it for my own username
useradd -m -g users -G wheel -s /bin/bash dylan

but I may also have omitted -G wheel .

Offline

#15 2013-10-08 23:46:07

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

Re: Can't log in as anything other than root

Sorry. I made a mistake. Do this:

# usermod -g users -G wheel dylan
# chown -R dylan:users /home/dylan

I told you to add users as a supplementary group but it needs to be primary group. The above command should fix that and the chown should then work.


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

#16 2013-10-08 23:48:49

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

Tried the above but I'm still getting operation not permitted from chown.  Usermod command worked fine though

Offline

#17 2013-10-08 23:57:43

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

Re: Can't log in as anything other than root

What do the earlier grep commands give now?


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

#18 2013-10-09 00:13:04

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

passwd:
dylan:x:1000:100:Dylan,home:/home/dylan:/bin/bash

group:
users:x:100:

looks the same as before to me

EDIT:  I have not done anything with the user yet, so if it fixes the problem I would be able to make a new user from scratch using whatever command necessary and follow some instructions to get it working for logins.  Just an idea if it's something wrong with the user

Last edited by KiwiLinux (2013-10-09 00:15:27)

Offline

#19 2013-10-09 00:14:29

cookies
Member
Registered: 2013-01-17
Posts: 253

Re: Can't log in as anything other than root

KiwiLinux wrote:

but I believe i have a drive mounted in home or something like that which was in FAT32

Just out of curiosity: What's the output of

lsblk

and

mount

?

Offline

#20 2013-10-09 00:14:33

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

Re: Can't log in as anything other than root

Yes. You still are not in the users group.

What does df -h give?


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

#21 2013-10-09 00:16:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Can't log in as anything other than root

KiwiLinux wrote:

EDIT:  Filesystem is ext4 for my arch install, but I believe i have a drive mounted in home or something like that which was in FAT32

Lets not overlook this.  What do you mean you "believe"?  Is there, or isn't there?  If there is, what is it, why is it, and where is it actually mounted?  The output of `lsblk` will help answer some of these questions.

If you have an unrelated FAT32 partition mounted at /home or /home/<username>/ then it would mask the real data there, and could lead to many of the symptoms you are describing, particularly if it has only been mounted for a portion of the time.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#22 2013-10-09 00:17:38

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

lsblk:

sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0     8G  0 part /
├─sda2   8:2    0    53G  0 part
├─sda3   8:3    0     1K  0 part
├─sda4   8:4    0  72.2G  0 part /home
├─sda5   8:5    0  95.7G  0 part
└─sda6   8:6    0     2G  0 part
sdb      8:16   1   3.7G  0 disk
└─sdb1   8:17   1   3.7G  0 part /run/media/root/PENDRIVE

-------
mount

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1027104k,nr_inodes=219199,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=35,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
/dev/sda4 on /home type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
gvfsd-fuse on /run/user/0/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /run/media/root/PENDRIVE type vfat (rw,nosuid,nodev,relatime,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)



df -h:
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       7.8G  5.5G  2.0G  74% /
dev            1004M     0 1004M   0% /dev
run            1005M  736K 1005M   1% /run
tmpfs          1005M   84K 1005M   1% /dev/shm
tmpfs          1005M     0 1005M   0% /sys/fs/cgroup
tmpfs          1005M   12K 1005M   1% /tmp
/dev/sda4        73G  530M   72G   1% /home
/dev/sdb1       3.8G  529M  3.2G  14% /run/media/root/PENDRIVE

Offline

#23 2013-10-09 00:22:27

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

Re: Can't log in as anything other than root

There's your problem. sda4 is vfat - not ext4. [Trilby's right.]

EDIT: Maybe Trilby knows this? I don't understand why the user group is wrong in this case. That is, why is the contents of /etc/group incorrect?

Last edited by cfr (2013-10-09 00:26:02)


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

#24 2013-10-09 00:26:40

cookies
Member
Registered: 2013-01-17
Posts: 253

Re: Can't log in as anything other than root

cfr wrote:

EDIT: Maybe Trilby knows this? I don't understand why the user group is wrong in this case. That is, why is the contents of /etc/group incorrect?

The primary group is set in /etc/passwd, the additional ones are set in /etc/group.

Offline

#25 2013-10-09 00:27:46

KiwiLinux
Member
Registered: 2013-10-08
Posts: 26

Re: Can't log in as anything other than root

So should I reformat the drive as ext4?

Offline

Board footer

Powered by FluxBB