i tried to delete my user and recreate using “useradd” when mounting the new /home partition (on another machine).
strace
tty3
tty4
this part is extremely confusing for me.
i tried to delete my user and recreate using “useradd” when mounting the new /home partition (on another machine).
this part is extremely confusing for me.
It’s a permissions problem. More specifically, an ACL is set. If you remove any ACL from /home and/or your homedir it will probably work again.
Look at setfacl
2120 chdir("/home/brucekomike") = -1 EACCES (Permission denied)
2120 write(2, " -- brucekomike: ", 17) = 17
2120 write(2, "/home/brucekomike: change direct"..., 42) = 42
2120 write(2, ": Permission denied\n", 20) = 20
2120 chdir("/") = 0
2120 write(1, "Logging in with home = \"/\".\n", 28) = 28
...
2120 execve("/bin/bash", ["-bash"], 0x5623b1d69b40 /* 15 vars */) = 0
...
2120 chdir("/home/brucekomike") = 0
The first chdir is performed by login, not bash. Executing bash likely changes SELinux label (process domain). Which may explain what happens.
The lack of SELinux denials is not conclusive - a lot of denials are hidden because they happen too often.
Try
restorecon -vr /home
As a summary
/home in this example)create the conrresponding partition. (such as /dev/sdb1)
mount the new partition to a mount point. (/mnt/opt)
using rsync to copy files
rsync -avz /home/ /mnt/opt (run as root)`
umount the original /home volume and replace it with the new volume.
umount /home
umount /mnt/opt
mount /dev/sdb1 /home
fix the hidden permission issue (idk how to give it a proper naming)
restorecon -vr /home
That is wrong (for a generic instruction). SELinux labels are attached to files. restorecon only changes labels for files explicitly listed in the SELinux policy. SELinux policy does not (and cannot) enumerate every file in a user’s home directory and users are free to set an arbitrary labels.
On a SELinux enabled system you should be using SELinux aware tools to copy, archive or restore files. For rsync it means using -X to preserve extended attributes.
And changing /etc/fstab to fix the new situation for next boots?
i have no SELinux experience, but i can break my solution into sections.
Corrections are welcome, but I have a little confidence that this would be enough.
All commands excuted as root.
fdiskmkfs.ext4mkdir /mnt/optmount /dev/sdb1 /mnt/optsince i’ve already fixed the login issue. i have no motivation to test the result of this command
rsync -avzX /home/ /mnt/opt (may let you skip that reparation step, not tested)rsync -avz /home/ /mnt/optlsblk -f | grep sdb1 >> /dev/fstabUUID=<UUID> /home ext4 defaults 0 2ctrl alt F3)systemctl stop <Desktop Manager> (sddm or gdm AFAK)umount /homemount /home (assuming the fstab is already set)restorecon -vr /home (if the permission issue exists)systemctl restart <DM>This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.