Cannot change password in YaST

Hi everyone,

I ran into a problem with openSuse 12.1. After signing in as a SU root in terminal I cannot get back to my profile. YaST>Securities and Users>User and Group Management showed some password associated with my username (that I don’t know) and would not remember a change of password. So on restart I can sign in as root only. » # passwd myusername « doesn’t affect the password stored by YaST.

Any ideas?

On 01/15/2012 10:16 PM, yefimb wrote:
> After signing in as a SU root in terminal I cannot get back to my profile.

what did you do while root in that terminal?

and, what does “I cannot get back to my profile” mean? do you literally
mean you can not open /home/[yourID]/.profile?? if not what do you mean?

and, when you closed that root terminal were you still logged into a
desktop environment (which?) as yourself??

if not, what happened, exactly?

well, was it a full screen terminal you accessed by Ctrl+Alt+Fn, or an
xterm, or a konsole, or in just exactly what kind of “terminal” did you
become root?

while you were root in the terminal did you cd to your home? and do what
there?

please enter the following into a terminal and copy/paste the the output
back to this thread


ls -hal /home/[yourID]/ | grep authority

of course, change [yourID] to whatever your normal user name is on the
machine…


DD
openSUSE®, the “German Engineered Automobiles” of operating systems!

When you are logged in as root (I take this is at the text console --tty1), you can enter yast and use YaST in ncurses mode.
YaST >> Security and Users >> User and Group Management

Then you can edit any user password, groups, home directory, shell, etc.

On 2012-01-15 22:16, yefimb wrote:
>
> Hi everyone,
>
> I ran into a problem with openSuse 12.1. After signing in as a SU
> root in terminal I cannot get back to my profile.

What do you mean?


Cheers / Saludos,

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

OK, please keep in mind that I am new to Linux and know nothing about programming or system administration. Yes, I am a complete blonde! :shame:
I’ll try to be more specific. Terminal means konsole. And I cannot log in to GUI under my user name now. The login screen would not accept my password. Well, to be exact, the screen turns black for a short time and goes back to login. So, the only option I have - is to log in as root. While logged in this way, I tried to change the password for my user name account both on konsole (passwd command) and YaST (User and Group Management) simultaneously, delete the password, even delete the account and add it again - nothing works. The combination of my user name and password lets me to log in the Ctrl+Alt+Fn terminal but not into the desktop environment. I ran your code and got:

-rw------- 1 myusername users 0 Jan 15 18:55 .Xauthority

While logged as root I can access my home directory both by cd in konsole and Dolphin in Desktop. Again, the only problem is that I cannot log in to Desktop under my user name or under anything else than root.

Thanks.

Ok you have been running a GUI as root this is not a good thing under an Unix like system. What has happened is you changed ownership of the .Xauthorty file. It is now owned by root not by you.

The fix may sound scary but it is not that hard

You need to boot to terminal mode. You do this by entering 3 at the boot screen

This will bring you to a terminal log in log in as root
type

rm /home/yourusername/.Xauthority

note the period in front of Xauthority and place you user name where I typed yourusername and remember that in Linux case counts

that will remove the file it will be recreated when you log to the GUI as yourself.

then type reboot to reboot the system
That should fix the problem

Thanks, but this did not help. I removed .Xauthority, did ls /home/myusername/ to verify that it is not there, rebooted, and tried to log in as myusername. Same story! The screen turned black for couple seconds and went back to login screen. I started in terminal mode, logged in as root, and typed ls /home/myusername/. .Xauthority was there again (was recreated on an attempt to log in?). So, I am still logged as root.

On 01/16/2012 02:36 AM, yefimb wrote:
> I’ll try to be more specific. Terminal means konsole. And I cannot log
> in to GUI under my user name now.

thank you for your almost complete answer…but, you missed a couple of
crucial ones: you wrote “After signing in as a SU root in terminal I
cannot get back to my profile.”

and i asked two (multi-part) questions:

  1. “what did you do while root in that terminal?”

we need to know what you did in that root konsole session while logged
into KDE as yourself?

i mean, did you edit some config files? (which?)
did you install some software (what?)
did you transfer/copy/move/backup a lot of (or any) files from one place
to another?

because something you did (which i can’t from here imagine or guess)
has spoiled your system, badly!

and, there is no way i can help you fix it until you tell us what you did.

  1. “when you closed that root terminal were you still logged into a
    desktop environment (which?) as yourself?? if not, what happened, exactly?”

i mean, if while you were in the root konsole:
-did you get any error messages?
-did the system crash?
-did you use the power button to shutdown and reboot?
-or, did you continue working as yourself in KDE, then shut down
normally and the next time you booted you could not log in as yourself?
-or what?

hmmmm…do NOT log into KDE as root, ever! not even when you can not log
in as yourself!

ok, i guessed the first time (when i asked for the ls output) that you
had corrumpted your Xauthority file, but i could see from your output
that you had not (the output showed you still owned it, as it should be)

so, now i guess that maybe you might have moved stuff around or
installed some software while in that root console and how your linux
partitions are full, so do this: at the first green screen (the one
where you can select to boot linux or windows) when it first comes up
just type 3 and press enter…that should result in you going to a full
screen (real terminal) command line log in prompt in run level three…

when there at the log in prompt (looks like “blah-blah login:”) type
root and then give the root password…

the prompt will turn red, type in and press enter:


df -hlT

which will return a chart of info kinda like this:


Filesystem    Type    Size  Used Avail Use% Mounted on
rootfs      rootfs     20G  6.2G   13G  33% /
devtmpfs  devtmpfs    486M  220K  486M   1% /dev
tmpfs        tmpfs    492M  4.0K  492M   1% /dev/shm
/dev/sda6     ext4     20G  6.2G   13G  33% /
/dev/sda7     ext4    104G   35G   68G  34% /home

and, in your “Use%” column are any of the percentages used above about 90%?

if there are, we probably know how to help…but, if they are all low
like mine then you have to tell us what you did as root? that might
give us a clue as to where to next begin guessing…


DD http://tinyurl.com/DD-Caveat http://tinyurl.com/DD-Hardware
http://tinyurl.com/DD-Software
openSUSE®, the “German Engineered Automobiles” of operating systems!

On 2012-01-16 07:26, yefimb wrote:
> Thanks, but this did not help. I removed .Xauthority, did ls
> /home/myusername/ to verify that it is not there, rebooted, and tried to
> log in as myusername. Same story!

I was afraid of that.

> The screen turned black for couple
> seconds and went back to login screen. I started in terminal mode,
> logged in as root, and typed ls /home/myusername/. .Xauthority was
> there again (was recreated on an attempt to log in?). So, I am still
> logged as root.

Try creating a new, different user (in Yast). You can do that in text mode.

Before trying to log in, do something more. Notice that in runlevel 5
(graphic) you can go to a text mode terminal by typing “ctrl-alt-f1…f6”.
Do so. Log in as root there. Type “less /var/log/messages”. This will
display that log file, and allow you to go back and forth. If you type “h”
you get help. Uppercase “F” will go to the end and wait for new lines, and
Ctrl-C exits of that wait mode.

That’s is what I want to see, the last lines of the log, or more exactly,
what is printed when you try to log in graphical mode. Make a note of the
timestamp of the last entry. Type ctrl-alt-f7 to go pack to graphics and
try once, then back to the opened terminal and see what is there.

Maybe later you can post those lines here (using codetags) or in pastebin.


Cheers / Saludos,

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

Hmmm

There may be other files not owned by the user but by root. Please do not ever log into a GUI as root. It is ok from the command line but never into a GUI.

Do as Carlos says and try a new user. If this works which it probably will it shows that you have messed up ownership in your directory probably by log nto the GUI as root

Also if you do a ls -l on the directory it should not show any files owned by anyone else then the owner of the directory in this case you.

chown any files to the proper user

man chown for how to use it