Login gives error - Can't create /home/username/* on Linux Mint 17.2
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952
Rep:
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.
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.
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
Last edited by af7567; 02-23-2016 at 05:44 PM.
Reason: added link
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.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952
Rep:
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?
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.
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
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.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952
Rep:
Quote:
Originally Posted by Delusion of Adequacy
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???
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.
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???
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
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952
Rep:
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.