Normal user can not login

Hi,
I can’t log into my normal user account anymore, though I can log in with root without any problem.
When I enter my normal user name and password, the screen blinks, a black page appears and after a couple of seconds I get the login screen again.
I deleted /tmp files but no changes.
I tried to login using command mode. So I hit Ctrl-Alt-F1 and log into root in command mode, then ran init3, then switched user to my normal user and ran startx. It worked and I logged into my normal account, but I can not do this process every time. So, what is the problem? How can I solve this problem? I used to work with my normal user flawlessly.
I installed a bunch of software and also copied some folders to my home directory, but I don’t know whether these activities caused the problem or not.
I’m using KDE4 under openSUSE 11.2.
Waiting for your answers :wink:

Since you can login as root, why not just change your normal user password or even just create a new user and see if that will work?

Thank You,

fireali wrote:
> I can’t log into my normal user account anymore, though I can log in
> with root without any problem.

ok, you are new to openSUSE right? -=welcome=- to our forum, new
poster fireali…

and, i guess you are new to Linux too, right? -=welcome=- new Linux user!!

my guess is you don’t know yet that you should never log into
KDE/Gnome/XFCE or any other *nix-like graphical user interface desktop
environment as root…[not even just to see if it will run as root!!]

doing so 1) opens you up to several different security problems, 2)
too many too easy ways to damage your system no matter how careful
your actions (example: just browsing in your home directory while
logged into KDE/Gnome/etc as root can lock you out later as yourself
due to permissions damage), 3) and, anyway logging into KDE/etc as
root is never required to do any and all administrative duties…

so, always log in as yourself, and “become root” by using a root
powered application (like YaST, File Manager Superuser Mode) or using
“su -”, sudo, kdesu, or gnomesu in a terminal to launch whatever tool
is needed (like Kwrite to edit a config file)…read more on all that
here:

http://en.opensuse.org/SDB:Login_as_root
http://docs.kde.org/stable/en/kdebase-runtime/userguide/root.html
http://tinyurl.com/6ry6yd
http://tinyurl.com/ydbwssh

it is somewhere between ‘really difficult’ to impossible to tell
from afar what all might have gotten jumbled up in your system, and it
might take many many back and forth posts to get you going again…or
after many tries you may still have to reinstall to recover…

so, i’d suggest you restore from a recent backup to get working again…

you have a backup, right?

if not, it is likely you need to boot from a live CD and use that to
backup whatever data (mails, movies, music, letter, set) you have
generated/downloaded onto the new openSUSE system, and THEN
reinstall…and, this time give root a different password and do NOT
log into KDE/Gnome or any GUI as root ever again.

i hope that is helpful (and, i know it is impossible to be born with
that knowledge…btw, a lot of the old habits from the old systems
[like logging in as Administrator] just cause troubles here…track
down some documentation and have a read how to do it correctly,
first…see, for example here: http://tinyurl.com/ybklh48)


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

Did you also take a look at the size of files in /var/log ?

I’ve been bit by having a failed print job that in a moment of sillycpu foolishness I failed to delete, and ultimately it created massive /var/log/messages and /var/log/warning such that I filled up a 1.5 Terrabyte drive in about a day or so . :slight_smile:

Hi, this is my first post, so I would like to thank you in the first place for all the help I’ve got from these forums.
I’ve just installed opensuse 11.2 32bits and my problem is the same as Fireali: when I try to login with my normal user account, the screen blinks for a second and gets me back to the login screen. My interest in this user account is because this is where I mount my /home directory.
I can login as root perfectly so I’ve created a new user account, and this new user works fine. Then I’ve successfully changed the password of my usual account using the terminal, but the problem isn’t solved, and I continue to fail to login with this user.
Any thoughts about this? I do not have so much experience using OpenSUSE, so I would really appreciate your support. Thanks!

So mistreated, if you created a new user and it works fine, perhaps you should log in as root and delete your original user name. Then, reboot and go back in and create your original user name one more time.

It sounds like something is wrong with the desktop you are trying to load, but only in the original user name which keeps it from starting. If for instance you use kde4, logging in as root, you could delete the hidden folder .kde4 in the /home/user where the user is the name you can not get to work (can’t log in). This would cause all kde4 applications to return to their default settings, which might let it start properly.

It is all kind of a guess why root user works and another user name does not work.

Thank You,

Thank You,

Hi,

It would appear that you have some settings files in your user’s home
directory preventing you from logging in as them.

I would suggest backing up any files in that directory you need to some
external media and deleting the contents of the /home/<problem-user>/
directory (including hidden files and directories) whilst logged in as
the other user and using ‘su -’ to get root permissions; logging in as
root can cause you even more problems.

The you should be able to log in as the user you were having trouble
with and you can copy back the files you backed up.

Regards,
Barry.

jdmcdaniel3 wrote:
> perhaps you should log in as root and delete your original user name.

thank you for being helpful but please stop it! please!! please do not
suggest such to new users…

listen carefully, please: do not log into KDE/Gnome/XFCE/etc desktop
environment as root! in fact, it MAY be that his problem was caused
from logging into the DE as root…

doing so 1) opens you up to several different security problems, 2)
too many too easy ways to damage your system no matter how careful
your actions (example: just browsing in your home directory while
logged into KDE/Gnome/etc as root can lock you out later as yourself
due to permissions damage), 3) and, anyway logging into KDE/etc as
root is never required to do any and all administrative duties…

so, always log in as yourself, and “become root” by using a root
powered application (like YaST, File Manager Superuser Mode) or using
“su -”, sudo, kdesu, or gnomesu in a terminal to launch whatever tool
is needed (like Kwrite to edit a config file)…read more on all that
here:

http://en.opensuse.org/SDB:Login_as_root
http://docs.kde.org/stable/en/kdebase-runtime/userguide/root.html
http://tinyurl.com/6ry6yd
http://tinyurl.com/ydbwss

to do what jdmcdaniel3 was advising SAFELY:

-log into the new user account AS the new user
-start YaST, give root password (which makes you root INSIDE YaST
only), go Security and Users > User Management, and delete the old
user account. and close the User Management window
-then (no reboot required) , reopen the User Management window, add
what account you want and close yast…

HOWEVER, though i have demonstrated how your steps to try can be done
easily, more quickly and more safely without logging in as root, i can
see no reason why it will affect the underlying problem…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

I’ve logged in with another user I created, and I’ve become root and deleted the .kde, .kde4, .kdemod4 folders in my user (the user that doesn’t work) home folder. The login continue to fail. I guess that I will have to backup my files and then delete the problem user account, as you suggested.
Now that I have one user working, is it a crazy thing to copy my files from one user to another? I ask this in order to avoid copying all my files into an external device. I guess that I could login as root and copy the personal files from one user to another, but I don’t know if this is a good idea since you have suggested me not to login as root.

Thanks for your help, it is very appreciated.

DenverD, when you can only get the root account to work, then you must login as root. Using the root account long enough to fix another user account problem should not cause a large security risk in my opinion. Further, this is not a suggestion to use the root account after you have fixed your login problem.

None the less, I shall bow to your suggestions, and will drop out of this thread.

Thank You,

My guess is the OP damaged the ownership of the .Xauthority file in the user directory of the problem account by logging in to the GUI as root in the past. This is the most common damage that can happen from logging into a GUI as root. Changing the ownership of the file back to the account UID and the user group should fix the problem. Then never ever logging into a GUI as root in the future will prevent it from happening. :slight_smile:

On 2010-07-03 13:16 GMT mistreated wrote:

>
> I’ve logged in with another user I created, and I’ve become root and
> deleted the .kde, .kde4, .kdemod4 folders in my user (the user that
> doesn’t work) home folder. The login continue to fail. I guess that I
> will have to backup my files and then delete the problem user account,
> as you suggested.
> Now that I have one user working, is it a crazy thing to copy my files
> from one user to another? I ask this in order to avoid copying all my
> files into an external device. I guess that I could login as root and
> copy the personal files from one user to another, but I don’t know if
> this is a good idea since you have suggested me not to login as root.

There are many things you can do.

The problem with “copying files” is that, typically, the files will get
their permissions as “files owned by root” (or the user you use for the
operation), and then, your normal user can’t use them.

If the problem is that some files on your user’s home have wrong
permissions, then the best thing is change those. No need to despair.
Only a full delete is disastrous >:-)

Me, I would use text mode - type ctrl-alt-f1, and log in - as root,
can’t be helped. Now, be careful with what you type.

As I assume you are not used to text mode, so issue this command:

mc

it is a very powerful text mode file browser, similar to the old MsDOS
Norton Commander, but named “Midnight Commander” (there was also an
xtree clone).

Navigate to your user’s home, like /home/USERNAME. Press “F9” to get
the menu, choose “left”, “Listing mode”, and select “Long file list”.
This will switch the display to a single panel file list, in which you
can see the owner and the permissions of each file.

Mark those files with bad owner (use the “ins” key), then choose the
“File” menu, then “chown”. In the dialog, choose the appropriate names,
then select the button “set all”.

This should be all. Now press ctrl-alt-f7 to go back to the graphical
mode, and try to log in as that user.

If it doesn’t work, there is a brute force method with “mc” to change
all files on your entire home. Choose menu “command”, then “Find file”,
enter. This will find all files on your home. Once it finishes, press
the button “panelize” (alt-l). Select all files ("*" in numerical
keyboard), then all directories (with the “ins” key, repeatedly). Then
change the ownership of all like the previous attempt.

Try login again.

If it works, tell us. If it doesn’t, tell us. If in doubt, ask us :slight_smile:

Ah, and go back to text mode to restore the default “mc” display (left,
listing mode, full file list), and exit (F10). It is a good browser
even inside kde or gnome, powerful and fast for things like copying a
ton of files, even from another computer, or editing configuration
files. You should learn to use it, it is very handy for emergencies.

You can also use it to copy the entire home from one user to another
with the proper permissions, if you do is as that user. Move would fail
(no permission).

Alternatively, you can learn to use the command line. This line should
do it:


find /home/USERNAME/ -exec chown USERNAME:users '{}' \;

It has to be done by root, so careful. Wait for comments from others ,-)
I’m sleepy and hungry and distracted, so don’t trust me to the
letter :-p


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Sorry gogalthorp , but i don’t understand this point:shame: If you were so nice to explain it a little bit more extensively for a newbie like me, I would appreciate that!!

To Carlos E. R. –> I’ve tried your suggestions, but I’ve had no success, the login problem stays exactly the same. Nevertheless, thank you so much for such an extensive answer lol!

I’ll keep on trying whatever you suggest! Thank you so much!

Well, thanks everybody for your contributions. And DenverD, your assumptions was not very accurate, I’m just new to this forum, not to Linux neither OpenSuse, though I’m not a guru, too :wink: Besides, I think reinstalling should be the last solution.
And about logging in with superuser (root), I do agree, just like everybody who has used linux, that while you have a normal user, you should never log in as root. But when you don’t have, you NEED to log in as root to create a normal user account.

Anyway, I solved the problem, and it seems that others with the same problem can do it. The problem is with some new files in my home directory. Though I’m steal not sure which one, but I will try to figure it out soon.
My solution is pretty simple and straight forward, and I will explain it step by step for ‘mistreated’
1- Log in using root, if you don’t have any other option.
2- Start YaST.
3- Select Security and Users in the left list.
4- Click Users and Group section in the right list.
5- A window will show up with a list of system user(s). Select the user you have problem with and click on Edit button.
6- A window will show up with 4 tabs. Select Details tab. It’s the second one.
7- Change your home directory. For example, if it is /home/mistreated change it to /home/mistreated1
8- Click on OK. Wait for the system to finish the task. Then log out.

Now you should be able to log in as the normal user.
Let me know if it solved the problem.

PS: Sorry for late reply, I’m in a trip.

Running a GUI as root can change the ownership of certain control file in a users directory like .Xauthority and .ICEauthority and possibly others. If these files become owned by root the user can no longer use them and can not log in. This can happen by simply browsing the user directory from a root owned GUI. So it is best never to log into a GUI as root. There is nothing you can do by this that can not be done as simply running the tools as root from a user owned GUI.

On 2010-07-04 16:56 GMT mistreated wrote:

> To Carlos E. R. → I’ve tried your suggestions, but I’ve had no
> success, the login problem stays exactly the same. Nevertheless, thank
> you so much for such an extensive answer lol!

Welcome.

Well, if changing the ownership on the entire home directory did not
solve the issue, then it is not a permission problem, it is something
else.

Did you have a look at the “/var/log/Xorg.0.log” file? I don’t remember
if this was suggested earlier.

Have a look (in text mode, just after a failed attempt) for lines
starting with “(EE)”. If you don’t see anything obvious, you could post
the file into a pastebin server.

In graphics mode you have to look at Xorg.0.log.old instead.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

You certainly do have another option boot to a terminal log in as root then run yast. Yes it is the CL ncurses version and you must navigate with the keyboard but it allows the same functions as the GUI version.

Or you can just use the command line to add a new user.

Linux User Commands Tips

On 2010-07-04 18:16 GMT gogalthorp wrote:

> Running a GUI as root can change the ownership of certain control file
> in a users directory like .Xauthority and .ICEauthority and possibly
> others.

Those two files should be written on root’s home, even if root is
browsing some other directories. You have to do something else than
simply log-in as root to get that behaviour.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

On 2010-07-04 18:16 GMT fireali wrote:

> 6- A window will show up with 4 tabs. Select Details tab. It’s the
> second one.
> 7- Change your home directory. For example, if it is /home/mistreated
> change it to /home/mistreated1
> 8- Click on OK. Wait for the system to finish the task. Then log out.
>
> Now you should be able to log in as the normal user.
> Let me know if it solved the problem.

Well… what this does is create a new home directory with another
name. All your old files should be in the old home - but careful, it is
possible to automate deletion of a home when a user is removed.

Similar to creating a new user, but with the same name and the same
uid. Nice trick, it is new to me :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

fireali wrote:
> And DenverD, your
> assumptions was not very accurate, I’m just new to this forum, not to
> Linux neither OpenSuse, though I’m not a guru, too :wink: Besides, I think
> reinstalling should be the last solution.

i agree that reinstalling is the last solution when you know you
have a healthy system which has not been abused by a root logged into
the GUI and then doing unknown and often unfindable damage…

but, when a system has been damaged in unknown ways . . .

> And about logging in with superuser (root), I do agree, just like
> everybody who has used linux, that while you have a normal user, you
> should never log in as root. But when you don’t have, you NEED to log in
> as root to create a normal user account.

no, boot to run level three, and at the presented command line log in
as root, then type “yast” and use the non-GUI version of YaST…

or, just add a new user directly from the command line using
‘adduser’ and then ‘passwd’, see “man adduser” and “man passwd” for
details…or, see here (for one example of the thousands of how-tos
google find on this “add a new user” task):
http://www.linuxheadquarters.com/howto/basic/adduser.shtml

as mentioned, there is never a requirement to log into KDE/Gnome/etc
as root to preform any administrator function.

on your “i’m not new” comment: i’m not either, BUT i learn something
new everyday because i’m not a guru either…take my word for it there
is no requirement to log into KDE/etc as root–so, don’t do it!


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio