LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Login gives error - Can't create /home/username/* on Linux Mint 17.2 (https://www.linuxquestions.org/questions/linux-software-2/login-gives-error-cant-create-home-username-%2A-on-linux-mint-17-2-a-4175573042/)

Delusion of Adequacy 02-23-2016 03:46 PM

Login gives error - Can't create /home/username/* on Linux Mint 17.2
 
The issue:
I changed my password earlier today, but I must've made a typo, because I couldn't log in afterwards. I booted into the Grub menu and started a passwordless root shell to reset my password. This was succesful, as I could now enter the new new password and get past the login screen. However, as soon as I do that, I get an error that says:

Code:

Your session only lasted less than 10 seconds. If you have not logged out yourself, this could mean there is some installation problem, or that you may be out of diskspace. Try logging in with one of the failsafe sessions to see if you can fix this problem.

syndaemon: no process found
/etc/mdm/Xsession: Beginning session setup...
localuser:[username] being added to access control list
Can't create dir /home/[username]/Desktop
Can't create dir /home/[username]/Downloads
Can't create dir /home/[username]/Templates
Can't create dir /home/[username]/Public
Can't create dir /home/[username]/Documents
Can't create dir /home/[username]/Music
Can't create dir /home/[username]/Pictures
Can't create dir /home/[username]/Videos
Script for none started at run_im
Script for auto started at run_im
Script for default started at run_im
init: session.migration main process (2322)terminated with status 1
init: logrotate main process (2304) killed by TERM signal
init: Disconnected from notified D-Bus bus

I have the option to hit 'OK' which will take me back to the login screen. If I try to login again, I get the exact same message.

Note: where it says [username] in the above text, the actual error displayed my actual username. I am, however, paranoid when it comes to my online identity, hence I censored it in the error printed above.

I have tried:
  • rebooting the computer, both using a hard boot and using the shut down button on the login screen
rebooting the computer, both using a hard boot and using the shut down button on the login screen
  • booting in recovery mode and running 'fix broken packages' and 'check all files' (possibly 'all directories', I can't remember)
  • I have googled and searched every knowledge base I know off, but haven't found a fix

Other relevant info
I have linux mint 17.2 running on a 1TB external HDD, as my internal HD died months ago. So far, this worked like a charm. I am now using a live usb drive, as I hoped to be able to retrieve some essential files (such as my KeePass database file), but the install on the external HDD is encrypted through the use of the 'encrypt partition' option during install.

I have been using Linux Mint for about 6-8 months now, so I am somewhat proficient in the use of the terminal for day-to-day use, but I am fully ignorant on the underlying workings of Linux and the root command options at my disposal.

---Edit---
This is the Linux distro I'm using on the live USB, which is the same one as I've installed on the external HDD

Code:

mint@mint ~ $  cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.2
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
cat: /etc/upstream-release: Is a directory

And this is the kernel

Code:

Linux 3.16.0-38-generic x86_64
----Edit edit----------
I've just tried to use the command line to access my encrypted files, but failed miserably
Code:

mint@mint ~ $  ecryptfs-mount-private
ERROR: Encrypted private directory is not setup properly


BW-userx 02-23-2016 04:48 PM

my first self help try if this was to happen to me. I'd go into root account, if you do not have one then you'd have to use sudo to create another user. Log out of your user account- login to the other account. if no issues arise from this, it is a good sign.

then now that you have no root account in your new (other) account using sudo
Code:

userdel yourUserName
your files will still be there. then recreate your userName again exactly the one you just deleted.

Code:

useradd yourExactOldUserName
passwd yourExactOldUserName

follow promps adding your password.
you should get a message home directory already there .....
this should make your system give everything the proper links to your user home

that would count as a dirty fix in my book if it works, work around.

keep your new user omove all of your files into that one then

Code:

userdel -r userName
or if userName no longer there, then just manually delete the directories.

-- that's what I'd try

But this says
Quote:

Your session only lasted less than 10 seconds.
If you have not logged out yourself, this could mean
there is some installation problem, or that you may be out of diskspace.

Try logging in with one of the failsafe sessions to see if you can fix this problem.
I'd deff check into that as well.


Code:

cat /etc/passwd
check to see if you in fact created a different user.

Delusion of Adequacy 02-23-2016 04:58 PM

Thanks BW-userx, I'm going to try that. I'll report back :)

I am definitely not out of diskspace. I've used less than 10% of my HDD, which is also what I can see from the Live USB drive.

BW-userx 02-23-2016 05:39 PM

using the error message in google I just found this


it as these suggest a bug in the login manager, maybe switch to a different one.

af7567 02-23-2016 05:39 PM

Does the encrypted home option use your login password as your encryption password too? If so it sounds like your encrypted home is using your typoed password but your account is using the new password you set from the root shell, so they are out of sync.

You might have to boot back to the root shell, and reset your user account password to whatever it was before so that you can get your encrypted home mounted again. I know that will be a bit of a problem since you don't know what the password was changed to :)

edit:
The Linux Mint forums are down at the moment, but this post from the google cache suggests that changing your users password from a root shell is going to cause problems:
http://webcache.googleusercontent.co...trip=1&vwsrc=0

Delusion of Adequacy 02-23-2016 05:50 PM

Quote:

Originally Posted by BW-userx (Post 5505102)
using the error message in google I just found this


it as these suggest a bug in the login manager, maybe switch to a different one.

Thanks again, unfortunately your aforementioned solution didn't work.
These two threads I had found as well, but these didn't really help me out. Firstly, they seem to deal with a different issue than mine, and also these threads are quite old, so any bugs present back then would likely have been resolved by now.

BW-userx 02-23-2016 06:34 PM

Quote:

I changed my password earlier today, but I must've made a typo, because I couldn't log in afterwards. I booted into the Grub menu and started a passwordless root shell to reset my password.

localuser:[username] being added to access control list
did logging into that new user account on your PC cause any errors?

you can get into your hdd on your computer and visually verfiy your actual home / user is there?

according to this on access control list

Quote:

To enable ACL, the filesystem must be mounted with the acl option. You can use fstab to make it permanent on your system.
is or has that actually taken place?

you might want to take a look at this arch wiki so you can investagate your ACL. see if you find something a mist.


oh yes
At your login screen can you switch tty's using
Alt+Ctrl+F1 - F7?

if yes try loggin user name do an update && upgrade
Just knocking out options

Delusion of Adequacy 02-23-2016 06:36 PM

Quote:

Originally Posted by af7567 (Post 5505103)
Does the encrypted home option use your login password as your encryption password too? If so it sounds like your encrypted home is using your typoed password but your account is using the new password you set from the root shell, so they are out of sync.

You might have to boot back to the root shell, and reset your user account password to whatever it was before so that you can get your encrypted home mounted again. I know that will be a bit of a problem since you don't know what the password was changed to :)

edit:
The Linux Mint forums are down at the moment, but this post from the google cache suggests that changing your users password from a root shell is going to cause problems:
http://webcache.googleusercontent.co...trip=1&vwsrc=0

Thanks for your input. If what you're saying is true, I've lost my files, because prior to changing the password through the root, I tried every variation of the password I could imagine.

I did find this threat http://ubuntuforums.org/archive/inde...t-1597246.html outlining how to recover a passphrase, but this brought me no joy

Code:

mint@mint ~ $ ecryptfs-unwrap-passphrase /media/34e5c4fa-0621-46cb-83b0-763c2a0dc49c/home/.private/Tijmen/.ecryptfs/wrapped-passphrase
Passphrase:
Error: Unwrapping passphrase failed [-2]
Info: Check the system log for more information from libecryptfs


Delusion of Adequacy 02-23-2016 06:39 PM

Quote:

Originally Posted by BW-userx (Post 5505121)
did logging into that new user account on your PC cause any errors?

you can get into your hdd on your computer and visually verfiy your actual home / user is there?

according to this on access control list



is or has that actually taken place?

you might want to take a look at this arch wiki so you can investagate your ACL. see if you find something a mist.

I couldn't log in to the account I created, so I tried your approach from the shell root. I created the account using the shell root as well, but it didn't create a home folder, so I got a message pop-up that said I could try to load the account, but that it was unlikely to work unless I used a failsafe session. Unfortunately, I did not get the option to use a failsafe session, so that proved unsuccessful.

I wouldn't know about the ACL, I'll google it and see what I can find out.

BW-userx 02-23-2016 06:47 PM

Quote:

Originally Posted by Delusion of Adequacy (Post 5505125)
I couldn't log in to the account I created, so I tried your approach from the shell root. I created the account using the shell root as well, but it didn't create a home folder, so I got a message pop-up that said I could try to load the account, but that it was unlikely to work unless I used a failsafe session. Unfortunately, I did not get the option to use a failsafe session, so that proved unsuccessful.

I wouldn't know about the ACL, I'll google it and see what I can find out.

through your live boot can you get in your 'old' account using root user?

creating a new user if you can log in then your in your home directory just may be no other directories have been created. it happens, but you are in the users home directory.

that link shows how to configure your ACL

you're encripted??? :doh:


what are you running again?
I've never had such a problem as this before in everything I've used before.

from what @af7567 said, and if you're encripted you just may have screwed yourself.

you need an LQ ecription expert

Delusion of Adequacy 02-23-2016 06:55 PM

Quote:

Originally Posted by BW-userx (Post 5505127)
through your live boot can you get in your 'old' account using root user?

creating a new user if you can log in then your in your home directory just may be no other directories have been created. it happens, but you are in the users home directory.

that link shows how to configure your ACL

you're encripted??? :doh:

Yes, I can access the hdd from my live USB, and see the /home/ folder, as well as the /.encryptfs folder which holds 5 files: auto-mount, auto-umount, Private.mnt, Private.sig and wrapped-passphrase. I can also see my folders and files, but they're all encrypted. The frustrating thing is, I can see the file which contains my password, but I can't open it to access the password.

I ran the code to check for permissions, but the result was rather underwhelming

Code:

mint@mint ~ $ # getfacl /media/34e5c4fa-0621-46cb-83b0-763c2a0dc49c/home
mint@mint ~ $

Finally, yes, the home folder is encrypted. It seemed like a neat function when I installed Mint, but I have come to find it has its drawbacks.

BW-userx 02-23-2016 06:59 PM

I found this

---MODDED
Quote:

have you actually used a command to show your free space on that hard drive

get an actual visual
Code:

df
maybe worth a look, could be getting a false reading in some file size messing you up
end mod
Quote:

Your session only lasted less than 10 seconds. If you have not logged out yourself, this could mean that there is some installation problem or that you may be out of diskspace. Try logging in with one of the failsafe sessions to see if you can fix this problem. iewing ~/.xsession...
Code:

Best Answer:  Log in as root. Clean off space in the / and
 /home dir. This is most often caused by .xsessionerrors in
your home dir filling up or by log files filling up the /
partition. One reason I usually make /home a seperate partition.


If you cannot log in as root, try logging in from console mode.
 In Fedora and RH based systems shift control F1 will take you
 to the first virtual console. Usually X runs on F7 or F9,
depends ont he distro.


Do a tail on your .xsession error files. Save that off to a
file on another partition. NEVER use all your disk space on a
single partition for just this reason. Also when you do a major
 upgrade it's better to wipe out your / partition along with
whatever partition /bin and /usr are on. So I typically keep
that on one partition, keep my data on a /data partition. That
 way if I download a file that's massive I don't choke my
system, I just get a failed download. I normally create a /home
 as well to prevent .xsessionerrors from hosing the system
also. On servers or machines I run apps which can generate
massive log files like MySQL I create a seperate /var partition
also for the same reason.


If the above fail you can boot into single user mode or use
 the rescue CD to boot into single user mode. Then mount the
 / partition and delete the offending files which are causing
 you to run out of space. Look in your usernames home dir for
 .xessionerrors then look at /var/log and see how much space
 is being used there.

To see mounted partition space usage

df -h

to check which dirs are eating up all your space

du -h

from the dirs you want to check such as ~/yoursusername or
/var/log


Delusion of Adequacy 02-23-2016 07:05 PM

Quote:

Originally Posted by BW-userx (Post 5505127)
through your live boot can you get in your 'old' account using root user?


what are you running again?
I've never had such a problem as this before in everything I've used before.

from what @af7567 said, and if you're encripted you just may have screwed yourself.

you need an LQ ecription expert

I'm running
Code:

mint@mint ~ $  cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.2
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
cat: /etc/upstream-release: Is a directory

And yes, the home folder encryption isn't something I'm going to use again.

BW-userx 02-23-2016 07:08 PM

Quote:

Originally Posted by Delusion of Adequacy (Post 5505133)
I'm running
Code:

mint@mint ~ $  cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.2
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
cat: /etc/upstream-release: Is a directory

And yes, the home folder encryption isn't something I'm going to use again.

that was actually a retorical question...
but yeah... and did you really have a need for it?

Delusion of Adequacy 02-23-2016 07:09 PM

Quote:

Originally Posted by BW-userx (Post 5505131)
I found this

---MODDED

end mod


Code:

Best Answer:  Log in as root. Clean off space in the / and
 /home dir. This is most often caused by .xsessionerrors in
your home dir filling up or by log files filling up the /
partition. One reason I usually make /home a seperate partition.


If you cannot log in as root, try logging in from console mode.
 In Fedora and RH based systems shift control F1 will take you
 to the first virtual console. Usually X runs on F7 or F9,
depends ont he distro.


Do a tail on your .xsession error files. Save that off to a
file on another partition. NEVER use all your disk space on a
single partition for just this reason. Also when you do a major
 upgrade it's better to wipe out your / partition along with
whatever partition /bin and /usr are on. So I typically keep
that on one partition, keep my data on a /data partition. That
 way if I download a file that's massive I don't choke my
system, I just get a failed download. I normally create a /home
 as well to prevent .xsessionerrors from hosing the system
also. On servers or machines I run apps which can generate
massive log files like MySQL I create a seperate /var partition
also for the same reason.


If the above fail you can boot into single user mode or use
 the rescue CD to boot into single user mode. Then mount the
 / partition and delete the offending files which are causing
 you to run out of space. Look in your usernames home dir for
 .xessionerrors then look at /var/log and see how much space
 is being used there.

To see mounted partition space usage

df -h

to check which dirs are eating up all your space

du -h

from the dirs you want to check such as ~/yoursusername or
/var/log


Thanks again for your help.

df shows
Code:

mint@mint ~ $ df
df: ‘/root/.gvfs’: Permission denied
Filesystem                1K-blocks      Used Available Use% Mounted on
/cow                        2032928  1676256    250076  88% /
udev                        1979616        4  1979612  1% /dev
tmpfs                        404796      1552    403244  1% /run
/dev/sdb1                  3908100  3876388    31712 100% /cdrom
/dev/loop0                  1523456  1523456        0 100% /rofs
none                              4        0        4  0% /sys/fs/cgroup
tmpfs                      2023964        16  2023948  1% /tmp
none                          5120        0      5120  0% /run/lock
none                        2023964        84  2023880  1% /run/shm
none                        102400        28    102372  1% /run/user
/dev/mapper/mint--vg-root 956884652 103557812 804696876  12% /media/mint/34e5c4fa-0621-46cb-83b0-763c2a0dc49c

The HDD I'm trying to get into is the lower one, with just over 100 GB used and just over 800GB available. Disk space shouldn't cause any problems.


All times are GMT -5. The time now is 12:07 PM.