LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (http://www.linuxquestions.org/questions/mandriva-30/)
-   -   Password won't reset with Mdk 10.1 (http://www.linuxquestions.org/questions/mandriva-30/password-wont-reset-with-mdk-10-1-a-330507/)

linubex 06-05-2005 03:22 AM

Password won't reset with Mdk 10.1
 
I'm operating on a Dell GX-150, Mdk 10.1. I've searched through 8 pages of posts but haven't found anything that helps. I have four accounts set up on my computer. Three of the accounts, including Root, work just fine. However, trying to log in to my account, and my password is not accepted. I have no idea why my pw doesn't work - I haven't installed any updates, I've been trying to optimize my screen resolution, but that's it. So I go to MCC under my root account and take a look at my account. The first thing that I notice is that my pw is now five stars long instead of four '*****' - do idea why. Regardless, I change the pw, enter it twice, logout, try login - it appears to be accepted, but then I end up back at the gui login.
Next, I log in as root, to to MCC, users, change my pw again, but this time I just go back to my User information, and my pw is back to being five characters long. Then I make it nine characters long, click OK, go back to Edit Groups / Users - but again, the pw reverts to five characters. HELP.

huibert.alblas 06-05-2005 08:42 AM

First of all: many gui tools for usermanagement allways display the sam eamount of "*" for each password.
That way noone looking over your shoulder can see how long a password is supposed to be.

What you described as a allmost succesfull login (after changing the password) but then being directed bacj to the login screen, point to something like permisssion problems on your homedir... However that could have hapened.

PLease check if you have enough free space on /home and /tmp remember that root _allways_ has more free space thenb users, so that no user can fillup the entire filesystem)

Then check from a console (CRTL-F1) if you can login correctly, and check for errors.
If you can login here, you have no password problems.

Please check if you home dir is setup correctly in /ets/passwd

samael26 06-05-2005 09:18 AM

Go to /etc/passwd instead of your gui tools.
If there 's an "x" (no quotes) in your files, next to your name,
the encrypted passwd is in another file called /etc/shadow.
QUOTE :
"The command /usr/sbin/pwunconv deactivates the shadow password management and
generates a new file for /etc/passwd from
the files /etc/passwd and /etc/shadow. This diminishes your system security."

Excerpt from "Running Linux" fourth edition , O'Reilly editions. I don't know
if this works but this could help you get your former passwd back. Use it
at your own risks, however.

cheers

linubex 06-06-2005 04:21 AM

Permission denied
 
"Go to /etc/passwd instead of your gui tools."

I tried this in both a terminal and the console under MCC (is there a dufference between the two?) but both times I received an error message of : bash: /etc/passwd: Permission denied

I am currently logged in as root, and in terminal and console mode I took the further step of logging in as 'super user (does this make a difference once you are already in as root?)

I also tried /etc/shadow under the same circumstances, and I received the same message of permission denied.

"PLease check if you have enough free space on /home and /tmp remember that root _allways_ has more free space thenb users, so that no user can fillup the entire filesystem)"

How do I do this? But I don't think this is a problem - I just freed up gigis of space this week, before the lock-out.

"Then check from a console (CRTL-F1) if you can login correctly, and check for errors. If you can login here, you have no password problems."

I tried this as well, but nothing came up for me to login to.

I'll keep trying whatever it is you ask of me next. Thanks for your help

samael26 06-06-2005 05:51 AM

Oh yes, I see. You must open the /etc/passwd file with a text editor.

Type in a console, as root : vim /etc/passwd.

It will enable you to see what's inside your file.
Verify if you have the "x" character at the beginning
of your file, where there should be your password (encrypted, of course).
If you don't have vim on your system, just go to your main menu and open
the file with KWrite or Kate or another text editor.
Normally you shouldn't need to be logged in as root. But it is not a bad thing
if you use KWrite or Kate. To modify the lines in a file, you need to become
root ('su' + password) in a console

Do that and post the result
cheers

PS to check how much memory a directory occupies :

du /home du /tmp they will show you the space occupied by the home and temporary
directories. du stands for disk usage

linubex 06-07-2005 02:33 AM

Type in a console, as root : vim /etc/passwd.

It will enable you to see what's inside your file.
Verify if you have the "x" character at the beginning
of your file, where there should be your password (encrypted, of course).

OK, soI did that and this is what I got: myname:x:501:501:Myname:/home/myname:/bin/bash


PS to check how much memory a directory occupies :

du /home du /tmp they will show you the space occupied by the home and temporary
directories. du stands for disk usage

I checked the directories: 13G under Home and 2.3M under temp

What is the next step?

linubex 06-09-2005 03:39 AM

[QUOTE]Originally posted by samael26
[B]Go to /etc/passwd instead of your gui tools.
If there 's an "x" (no quotes) in your files, next to your name,
the encrypted passwd is in another file called /etc/shadow.
QUOTE :
"The command /usr/sbin/pwunconv deactivates the shadow password management and
generates a new file for /etc/passwd from
the files /etc/passwd and /etc/shadow. This diminishes your system security."

Hey, I missed this /etc/shadow the first time through, so I went back and checked that file and this is what I found:

myname:$1$q.A29GW5$6ee./LS7iERP6fUdxBwBD1:12942:-1:99999:-1:::

Does this help at all?


:confused: Still Lost :confused:

huibert.alblas 06-09-2005 06:07 AM

Are you _sure_ that you don't use any funnny characters in _your_ password wihich you don't use in the other 3 passwords.

If you can login and change the passwords on the other accounts, there is nothing wrong in /etc/passwd or /etc/shadow.
Don't go poking around in these files, unless you are absolutly sure what you are doing.
There are commandline tools to do this.

Please, go to a console (STRG-F1), then try the following:

- login as root
- logout
- login as a user which is known to work
- logout
- login as the "broken" user
- logout
- login as the "broken" user
- type "passwd"
- it will prompt for the current password, and a new password (twice)
- after succesfull change: logout
- login as "broken" user with new password
- logout


All these steps _must_ be done at console level (or ssh from xterm if you must, but I'd rather not do it, the problem is hard enough to debug as it is)

Please post at wihch step you get stuck, and why (don't post the passwords though :-)

linubex 06-09-2005 04:17 PM

[QUOTE]Originally posted by huibert.alblas
[B]Are you _sure_ that you don't use any funnny characters in _your_ password wihich you don't use in the other 3 passwords.

If you can login and change the passwords on the other accounts, there is nothing wrong in /etc/passwd or /etc/shadow.
Don't go poking around in these files, unless you are absolutly sure what you are doing.
There are commandline tools to do this.

Please, go to a console (STRG-F1), then try the following:

- login as root
- logout
- login as a user which is known to work
- logout
- login as the "broken" user
- logout
- login as the "broken" user
- type "passwd"
- it will prompt for the current password, and a new password (twice)
- after succesfull change: logout
- login as "broken" user with new password
- logout


Ok, so I did as you said, and this is what happened:

After going in as root, a user that works, and then the broken user, I received this message (aftering logging in with broken user):

No directory /home/myname!
Logging in with home = "/"
-bash: /home/myname/.bash-profile:Permission denied

I still went ahead with passwd, changed it and then received:

passwd: all authentication tokens updated successfully

Then I tried my gui login with the broken account: no luck. It just went through the same routine, appears to be loading, but then goes back to the gui login screen. Of note, my "guest" account is now exhibiting the same behaviour.

:confused:

ernie 06-09-2005 11:44 PM

Looks to me as if your /home partition is full, and your broken user account does not have a directory. To check if the /home partition is full, you can open KDiskFree in KDE at System / Monitoring / KDiskFree in the Mandrake menu system. This tool will show you how much free space you have on each mounted partition as well as the partition size and the amount of space used. If the /home partition is full, you may have to re-size it using a tool such as PartitionMagic or bootlt. Both have the ability to re-size partitions nondestructively.

HTH,

linubex 06-10-2005 12:08 AM

Quote:

Originally posted by ernie
Looks to me as if your /home partition is full, and your broken user account does not have a directory. To check if the /home partition is full, you can open KDiskFree in KDE at System / Monitoring / KDiskFree in the Mandrake menu system. This tool will show you how much free space you have on each mounted partition as well as the partition size and the amount of space used. If the /home partition is full, you may have to re-size it using a tool such as PartitionMagic or bootlt. Both have the ability to re-size partitions nondestructively.

HTH,


Thanks for chipping in here Ernie, much appreciated. I checked with KDiskFree as you suggested. Here are the results:

/dev/hda1 ext 3 is 64% full
/dev/hda6 ext 2 is 14.3% full

That doesn't seem like they are full.

:confused:

huibert.alblas 06-10-2005 06:00 AM

Disk full is not the problem here,
but could have been, so thanks for the chip-in :-)

Now back on topic, you are almost there.
After going through my proposed laundry list you gave the correct information to remedy your problem.

you wrote:
Code:


No directory /home/myname!
Logging in with home = "/"
-bash: /home/myname/.bash-profile:Permission denied

The "broken" user (lets call him "myname") has no home directory (poor guy)
It looks like you created this user, but the directory was not created.
But it is easy to recover:

In almost all linux distris I know there is a directory "/etc/skell"
now as root do the following:

Code:

cd /home
mkdir myname
cd /etc/skell
copy -R * .* /home/myname/.
cd /home
chown -R myname myname
^D (this is CTRL-d, which means "logout")

Innormal language:
Create the users home directory,
copy the default files into this diretory,
Change permisions for the useres directory to the user
(you coud alos do "chmod -R myname.users" if myname is in th euser group.

That's it.
That fact that you cannot use a grphical login is because X needs to set ~/.Xauthority but could not because your home directoyr was not writable for you......
Doing a simple text-console login does work, allthough your bash setting are not safed and you will have no bash_history.


Hope this is the end of your search:

Hapy Hacking!

linubex 06-10-2005 12:31 PM

In almost all linux distris I know there is a directory "/etc/skell"
now as root do the following:

Code:

cd /home
mkdir myname
cd /etc/skell
copy -R * .* /home/myname/.
cd /home
chown -R myname myname
^D (this is CTRL-d, which means "logout")


I did as you said for the first few steps and this is what happened:

[root@localhost root]# cd /home
[root@localhost home]# mkdir myname
mkdir: cannot create directory `myname': File exists
[root@localhost home]# cd /etc/skell
bash: cd: /etc/skell: No such file or directory


I figured I would keep going even after 'cannot create directory' just to see what happens; but then stopped at 'No such file or directory.' I also know that I can go into /home/myname to retrieve files by being root - doesn't that also counter the "No directory" hypothesis?

Still confused, but greatly appreciative of all these efforts.


:Pengy:

huibert.alblas 06-11-2005 04:40 AM

No such file or directory: means "/etc/skel" does not exists.
This is not a problem...

"Cannot create directory" on "/home/myname" means that the directory is already there.
You can retrieve files by being root.
You should have done the next steps anyway, that way the filepermissions would be ok again :-)

please post what happens with
Code:

ls -lah /home
Don't have much time now, just follw the recipe.

linubex 06-11-2005 05:29 AM

[QUOTE]Originally posted by huibert.alblas
[B]No such file or directory: means "/etc/skel" does not exists.
This is not a problem...

"Cannot create directory" on "/home/myname" means that the directory is already there.
You can retrieve files by being root.
You should have done the next steps anyway, that way the filepermissions would be ok again :-)

please post what happens with
Code:

ls -lah /home
Ok, so before I follow your recipe the rest of the way, here is what happened out of ls -lah /home:

total 32K
drwxr-xr-x 7 root root 4.0K Jun 6 23:52 ./
drwxr-xr-x 19 root adm 4.0K Jun 8 19:19 ../
drwx--x--x 23 guest guest 4.0K Jun 6 11:09 guest/
drwx--x--x 2 root root 4.0K Mar 18 13:38 lost+found/
d--------T 51 guest guest 8.0K Jun 8 14:35 myname/
drwx--x--x 30 mary mary 4.0K Jun 10 14:30 mary/
drwx------ 2 root root 4.0K Jun 9 03:02 .Trash-root/
]

Ok, so after I did the above, I then went and followed your recipe again:

[
[root@localhost home]# mk dir myname
bash: mk: command not found
[root@localhost home]# mkdir myname
mkdir: cannot create directory `myname': File exists
[root@localhost home]# cd /etc/skell
bash: cd: /etc/skell: No such file or directory
[root@localhost home]# copy -R * .* /home/myname/.
bash: copy: command not found
[root@localhost home]# copy -R * .*/home/myname/.
bash: copy: command not found
[root@localhost home]# copy -R *.*/home/phillip/.
bash: copy: command not found
[root@localhost home]# cd /home
[root@localhost home]# chown -R myname myname
[root@localhost home]#
root@localhost home]# ls -lah /home
total 32K
drwxr-xr-x 7 root root 4.0K Jun 6 23:52 ./
drwxr-xr-x 19 root adm 4.0K Jun 8 19:19 ../
drwx--x--x 23 guest guest 4.0K Jun 6 11:09 guest/
drwx--x--x 2 root root 4.0K Mar 18 13:38 lost+found/
d--------T 51 myname guest 8.0K Jun 8 14:35 myname/
drwx--x--x 30 mary mary 4.0K Jun 10 14:30 mary/
drwx------ 2 root root 4.0K Jun 9 03:02 .Trash-root/

The several copy -R lines were me just trying different permutations of what you had wriiten, trying to see if I had made a mistake in following the code.

I'll take this time to remind you that the "guest" account has been acting in the same manner recently as well.

Big Thank-You.


All times are GMT -5. The time now is 10:27 AM.