Unable to login -- Error: lnusertmp call fails

Hi all,
I just installed suse 12.1 on my earlier ‘/’ partition of 11.4. I have a separate partition for ‘/home’. When I installed suse, I gave the same username as old one but when I tried to login, it didn’t work. Instead I tried logging as root which worked. But I found that my old username was not there and I tried creating again – this time it worked and asked whether I want to keep my old directory structure (to which I said yes). When I again tried logging in, it gave the error call to lnusertmp failed. I think I know where the problem is – permissions of home directory got messed up when I initially logged in and they have root as owner. Can anyone help me how to fix this? What should I do in order to restore the correct username and groups?

Thanks!

  1. check the current user/groups on your home directory. Note that home itself should be owned by root best from the command line ls -l
    also note that ownership is based on UID and GID numbers not on your name
  2. If id incorrect change with chown command (see man chown for details)

On 11/20/2011 07:26 AM, bluering wrote:
> I know where the problem is – permissions of home
> directory got messed up when I initially logged in and they have root as
> owner.

this is a too often seen problem which can be caused by logging into
the GUI (KDE, Gnome, Xfce, LXDE, etc) as root…which is why i often
say: Do not log into any *nix GUI as root…it is never required to do
so to preform any administrator duty (and that includes “just logging in
as root to see if that works” because what do you learn when you do that?)

the fix is exactly as gogalthorp said: leave /home as is and only change
your subdirectory inside home


DD http://tinyurl.com/DD-Caveat
dump Flash: http://www.bbc.co.uk/news/technology-15797399

the fix is exactly as gogalthorp said: leave /home as is and only change
your subdirectory inside home

'I tried this command – ‘chown -R <user> /home/<user>’ – but it said operation not permitted … when I tried using sudo – it complained about /etc/sudoers should be owned by uid 0 and not by gid 10. Using, su it didn’t give any error but didn’t work too. Any suggestions?

Thanks for the help! For now I did the back up and reinstalled.

On 11/20/2011 07:16 PM, bluering wrote:
> Using, su
> it didn’t give any error but didn’t work too. Any suggestions?

-open a user terminal

-navigate to inside /home/[yourID]

-issue

ls -l

-the results should look something like this:


denverd@linux-os114:~> ls -l
total 3256
drwxr-xr-x 75 denverd users    4096 Nov 20 17:38 ./
drwxr-xr-x  5 root        root     4096 Aug 10 16:40 ../
drwx------  5 denverd users    4096 Oct  5 09:33 .adobe/
-rw-------  1 denverd users      24 Jul  2 11:02 .aspell.en.prepl
-rw-------  1 denverd users      36 Jul  2 11:02 .aspell.en.pws
-rw-------  1 denverd users   10898 Nov 19 23:31 .bash_history
-rw-r--r--  1 denverd users    1177 May 15  2011 .bashrc
<LOTS more snipped away>

if it doesn’t look kinda like that, post a representative sample of the
input and output as i did, between code tags using the instructions
here: http://goo.gl/i3wnr

DD
dump Flash: http://www.bbc.co.uk/news/technology-15797399

On 11/20/2011 08:06 PM, bluering wrote:
> back up and reinstalled.

wow!! you were about one minute away from fixing it the right way
(reinstall is the Wrong way, also known as the Windows way)


DD
dump Flash: http://www.bbc.co.uk/news/technology-15797399

You need to do the owner change as root so type
su -

first note thi will make you root and you will be in the /root directory so then change to the target

cd /home/theusernamehere

do ls-l to be sure you are at the right place then do the chown

On 2011-11-20 07:26, bluering wrote:
>
> Hi all,
> I just installed suse 12.1 on my earlier ‘/’ partition of 11.4. I have
> a separate partition for ‘/home’. When I installed suse, I gave the same
> username as old one but when I tried to login, it didn’t work. Instead I

There is an option when installing to import users from previous
installation, as well as importing fstab. It is a manual choice.

> I think I know where the problem is – permissions of home
> directory got messed up when I initially logged in and they have root as
> owner.

I doubt it. When you log in as root, you work in the directory /root. It
does not change the files in /home/user unless you do something else.

Another possibility is that the UID of the user you created doesn’t
coincide with the previous one.

> Can anyone help me how to fix this? What should I do in order to
> restore the correct username and groups?

First check that they are wrong, and how exactly they are wrong :slight_smile:

(Yes, I know you solved the issue… by reinstalling)


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Hi,
I’m new to this forum and thought I’d resurrect this thread since I have the exact same issue (if it’s better to open a new one, I hope that mods can extract my post).

I’m using an SSD with Win 8.1 and openSuSe 13.1 both freshly installed. I also have a 1TB HDD with a 16GB swap partition and the rest is an NTFS partition mounted as /home

I tried chmod 1777 of /tmp and /var/tmp
I also tried the chown -R user /home/user
Someone asked the output of ls -l, so here it is

openSuSE:/home/thomas # ls -l
total 24
-rw-r--r-- 1 root users    0 Sep  4 08:09 .bash_history
-rw-r--r-- 1 root users 1177 Sep  4 08:09 .bashrc
drwxr-xr-x 1 root users    0 Sep  4 08:09 .config
-rw-r--r-- 1 root users 1637 Sep  4 08:09 .emacs
drwxr-xr-x 1 root users    0 Sep  4 08:09 .fonts
-rw-r--r-- 1 root users  861 Sep  4 08:09 .inputrc
drwxr-xr-x 1 root users    0 Sep  4 08:09 .local
-rw-r--r-- 1 root users 1028 Sep  4 08:09 .profile
-rw-r--r-- 1 root users 1940 Sep  4 08:09 .xim.template
-rw-r--r-- 1 root users 1112 Sep  4 08:09 .xinitrc.template
drwxr-xr-x 1 root users    0 Sep  4 08:09 bin
drwxr-xr-x 1 root users    0 Sep  4 08:09 public_html
openSuSE:/home/thomas #

Do you have any other suggestions?

Thanks in advance

You use an NTFS partition as /home? That’s not advisable, and most likely the cause of your problem.

With YaST’s standard mount options, users don’t have write access to the partition, so KDE fails to create its directories and refuses to start.

I tried chmod 1777 of /tmp and /var/tmp

Your problem is not /tmp or /var/tmp, but /home/$USER…

I also tried the chown -R user /home/user

This doesn’t work on NTFS partitions. NTFS doesn’t know anything about Linux users and permissions.

Someone asked the output of ls -l, so here it is

openSuSE:/home/thomas # ls -l
total 24
-rw-r--r-- 1 root users    0 Sep  4 08:09 .bash_history
-rw-r--r-- 1 root users 1177 Sep  4 08:09 .bashrc
drwxr-xr-x 1 root users    0 Sep  4 08:09 .config
-rw-r--r-- 1 root users 1637 Sep  4 08:09 .emacs
drwxr-xr-x 1 root users    0 Sep  4 08:09 .fonts
-rw-r--r-- 1 root users  861 Sep  4 08:09 .inputrc
drwxr-xr-x 1 root users    0 Sep  4 08:09 .local
-rw-r--r-- 1 root users 1028 Sep  4 08:09 .profile
-rw-r--r-- 1 root users 1940 Sep  4 08:09 .xim.template
-rw-r--r-- 1 root users 1112 Sep  4 08:09 .xinitrc.template
drwxr-xr-x 1 root users    0 Sep  4 08:09 bin
drwxr-xr-x 1 root users    0 Sep  4 08:09 public_html
openSuSE:/home/thomas #

And here you can see that all files/directories are owned by root, and only writable by the owner, i.e. root.

Do you have any other suggestions?

Edit /etc/fstab and change the mount options for the /home partition to “defaults”.
I.e. the entry should look similar to this: (the red part is important)

/dev/sdb1            /home           ntfs-3g    defaults              0 0

You can also use YaST->System->Partitioner to change that, select the partition, click on “Edit”, click on “Mount Options” (or was it “Fstab Options”?) and just empty the text field.
Please note that this would give read/write access to all users though, so might not be the best thing either.
At least it should make it possible to login, and shouldn’t really matter on a singe-user system anyway. (and for a multi-user system, using one NTFS partition as /home wouldn’t even work in any other way, as all users need read/write access to their respective homes…)

Or maybe even better, create a new /home partition and format it with a Linux file system like ext4 if possible… :wink:

Well, apparently I forgot an ‘e’ in the error message and only found this thread.
by searching a bit more, I found this thread which explains that NTFS is the issue.

On 2014-09-04 22:46, Jtommi wrote:
>
> Well, apparently I forgot an ‘e’ in the error message and only found
> this thread.
> by searching a bit more, I found this thread which explains that NTFS is
> the issue.

Most certainly you can not use NTFS for a Linux /home. You can, instead,
create directories in it and link them to “/home/{username}/windata/” or
something, with “/home” being a native Linux filesystem. That’s assuming
that you are sharing data with Windows - because if you are not using
Windows on that computer I see no reason to have an NTFS partition in there.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)