You are not logged in.

#1 2021-12-28 19:23:20

elmuz
Member
Registered: 2015-04-19
Posts: 16

[SOLVED] homectl says user is in a dirty state

I cannot login. It keeps asking for the password (even though it's 100% correct). The home is encrypted, not sure if this is important. I can log in as root. Then if I `homectl inspect` my user it say that everything is fine but the "dirty" state. Using the procedure of rescue of a LUKS home folder gives me access to the folder (I could copy everything elsewhere if I need). However, I don't understand why homectl keeps refusing to log me in. Any idea on that? Any useful command that would help in de bugging this? Thank you in advance!

Last edited by elmuz (2021-12-29 20:30:56)

Offline

#2 2021-12-28 23:19:39

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,599

Re: [SOLVED] homectl says user is in a dirty state

Always check the 'Discussion tab' of a wiki page for extra information or messages...
https://wiki.archlinux.org/title/Talk:S … irty_state

Offline

#3 2021-12-29 16:45:57

elmuz
Member
Registered: 2015-04-19
Posts: 16

Re: [SOLVED] homectl says user is in a dirty state

I had already read that pace. As I said I am able to mount and access my data (i am doing backup righ now). I don't understand what i need to fsck, as stated in that page. I tried checking the loop mount and the dev/mapper. Fsck says no errors, in fact I am able to mount. Only homectl keeps saying the state is dirty. Any hint?

Last edited by elmuz (2021-12-29 16:48:10)

Offline

#4 2021-12-29 17:49:28

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: [SOLVED] homectl says user is in a dirty state

elmuz wrote:

I don't understand what i need to fsck

From the man page for losetup it would seem that

losetup -f -P <ImagePath>

would print the device name that should be fsck'ed, as no argument is passed to the -f argument?

Offline

#5 2021-12-29 18:41:32

elmuz
Member
Registered: 2015-04-19
Posts: 16

Re: [SOLVED] homectl says user is in a dirty state

It's strange. This is all I tried (everything as `root`):

homectl inspect alessio

gives:

   User name: alessio
       State: dirty
       ...       
       Image Path: /home/alessio.home
losetup -f -P /home/alessio.home

(no output)

fsck /dev/loop1p1

returns:

fsck da util-linux 2.37.2

(like nothing checked). Then I decrypted...

cryptsetup open /dev/loop1p1 rescue

...fill in the password

fsck /dev/mapper/rescue

gives:

fsck da util-linux 2.37.2
e2fsck 1.46.4 (18-Aug-2021)
alessio: clean, 858479/26591232 files, 39104281/106343945 blocks

However, login is not possible yet, with state dirty. This is an excerpt from journalctl

dic 28 17:15:11 erika audit[606]: USER_AUTH pid=606 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock acct="alessio" exe="/usr/bin/login" hostname=erika addr=? terminal=/dev/tty1 res=success'
dic 28 17:15:11 erika kernel: audit: type=1100 audit(1640708111.969:72): pid=606 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock acct="alessio" exe="/usr/bin/login" hostname=erika addr=? terminal=/dev/tty1 res=success'
dic 28 17:15:11 erika systemd-homed[418]: alessio: changing state dirty → activating-for-acquire
dic 28 17:15:11 erika systemd-homework[700]: None of the supplied plaintext passwords unlock the user record's hashed passwords.
dic 28 17:15:12 erika systemd-homed[418]: Activation failed: Required key not available
dic 28 17:15:12 erika systemd-homed[418]: alessio: changing state activating-for-acquire → dirty
dic 28 17:15:12 erika systemd-homed[418]: Got notification that all sessions of user alessio ended, deactivating automatically.
dic 28 17:15:12 erika systemd-homed[418]: Home alessio already deactivated, no automatic deactivation needed.
dic 28 17:15:12 erika systemd-homed[418]: Unable to determine state of home directory, ignoring: Device or resource busy
dic 28 17:15:15 erika systemd-homed[418]: alessio: changing state dirty → activating-for-acquire
dic 28 17:15:15 erika systemd-homework[701]: Provided password unlocks user record.
dic 28 17:15:15 erika systemd-homework[701]: Home directory /home/alessio exists, is not mounted but populated, refusing.
dic 28 17:15:15 erika systemd-homed[418]: Activation failed: Device or resource busy
dic 28 17:15:15 erika systemd-homed[418]: alessio: changing state activating-for-acquire → dirty
dic 28 17:15:15 erika systemd-homed[418]: Got notification that all sessions of user alessio ended, deactivating automatically.
dic 28 17:15:15 erika systemd-homed[418]: Home alessio already deactivated, no automatic deactivation needed.
dic 28 17:15:15 erika systemd-homed[418]: Unable to determine state of home directory, ignoring: Device or resource busy
dic 28 17:15:15 erika login[606]: pam_systemd_home(login:account): Failed to acquire home for user alessio: Home alessio is currently being used, or an operation on home alessio is currently being executed.
dic 28 17:15:15 erika audit[606]: USER_ACCT pid=606 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="alessio" exe="/usr/bin/login" hostname=erika addr=? terminal=/dev/tty1 res=success'
dic 28 17:15:15 erika audit[606]: CRED_ACQ pid=606 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock acct="alessio" exe="/usr/bin/login" hostname=erika addr=? terminal=/dev/tty1 res=success'
dic 28 17:15:15 erika kernel: audit: type=1101 audit(1640708115.809:73): pid=606 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="alessio" exe="/usr/bin/login" hostname=erika addr=? terminal=/dev/tty1 res=success'
dic 28 17:15:15 erika kernel: audit: type=1103 audit(1640708115.809:74): pid=606 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock acct="alessio" exe="/usr/bin/login" hostname=erika addr=? terminal=/dev/tty1 res=success'
dic 28 17:15:15 erika kernel: audit: type=1006 audit(1640708115.809:75): pid=606 uid=0 old-auid=4294967295 auid=60282 tty=tty1 old-ses=4294967295 ses=1 res=1
dic 28 17:15:15 erika systemd-homed[418]: alessio: changing state dirty → activating-for-acquire
dic 28 17:15:15 erika systemd-homework[702]: None of the supplied plaintext passwords unlock the user record's hashed passwords.
dic 28 17:15:15 erika systemd-homed[418]: Activation failed: Required key not available
dic 28 17:15:15 erika systemd-homed[418]: alessio: changing state activating-for-acquire → dirty
dic 28 17:15:15 erika systemd-homed[418]: Got notification that all sessions of user alessio ended, deactivating automatically.
dic 28 17:15:15 erika systemd-homed[418]: Home alessio already deactivated, no automatic deactivation needed.
dic 28 17:15:15 erika systemd-homed[418]: Unable to determine state of home directory, ignoring: Device or resource busy

Offline

#6 2021-12-29 19:46:06

loqs
Member
Registered: 2014-03-06
Posts: 18,987

Re: [SOLVED] homectl says user is in a dirty state

dic 28 17:15:15 erika systemd-homework[701]: Home directory /home/alessio exists, is not mounted but populated, refusing.

What is in /home/alessio?

Offline

#7 2021-12-29 19:53:21

elmuz
Member
Registered: 2015-04-19
Posts: 16

Re: [SOLVED] homectl says user is in a dirty state

loqs wrote:
dic 28 17:15:15 erika systemd-homework[701]: Home directory /home/alessio exists, is not mounted but populated, refusing.

What is in /home/alessio?

ls -lah /home/

totale 465G
drwxr-xr-x  5 root  root  4,0K 29 dic 18.50 .
drwxr-xr-x 17 root  root  4,0K 29 dic 18.16 ..
drwx------  4 root  root  4,0K  3 gen  2021 alessio
-rw-------  1 root  root  406G 29 dic 19.23 alessio.home
drwx------  2 root  root   16K 29 dic  2020 lost+found
ls -lah home/alessio

totale 16K
drwx------ 4 root root 4,0K  3 gen  2021 .
drwxr-xr-x 5 root root 4,0K 29 dic 18.50 ..
drwxr-xr-x 2 root root 4,0K  2 gen  2021 .cache
drwxr-xr-x 2 root root 4,0K  3 gen  2021 .cache_tmpfs

Offline

#8 2021-12-29 20:30:10

elmuz
Member
Registered: 2015-04-19
Posts: 16

Re: [SOLVED] homectl says user is in a dirty state

Ok. Removing those two empty folders made me able to activate the user again. What I don't understand is why those folders are almost 1 year old, but the issue manifested only yesterday. Any idea?
Btw I can mark this as solved.

Offline

Board footer

Powered by FluxBB