I am running Ubuntu 14.04 LTS.
Yesterday, I changed the password on my user account, which is an admin account. This morning, I discovered that I can no longer use sudo su
to switch to root. I know that sudo uses my user account's password, not the root account's password, but it did not allow me to go to sudo su with either password.
Then, after a reboot, when I logged in to the user account, it flashed a message on the screen briefly and then asked for my user name and password again. I had also changed privileges on my home directory yesterday, so I logged in as root and issued chmod 777
against my home directory. Now I can log in using that user account, but my directory structure has been replaced as though I am a new user. If I look at the directory from a terminal as root, I see this instead of the former directory structure:
root@CLM1001-Ubuntu:/home/stephen# whoami
root
root@CLM1001-Ubuntu:/home/stephen# ls
Access-Your-Private-Data.desktop Documents Music Public Templates
Desktop Downloads Pictures README.txt Videos
root@CLM1001-Ubuntu:/home/stephen#
I have seen this behavior before after trying to remove .ecryptfs
and my only recourse then was to restore from system backups.
Is there something I can do to get this user account working properly again, short of doing another full system restore from backup?
I looked at /var/log/syslog
and /var/log/auth.log
but didn't see anything that was obvious to me. I can add dumps from those logs if needed, but they are large.
Adding a little more info: I noticed that my user account can no longer execute mysqldump - it gets privilege denied errors. Although I am able to get into phpmysql. (I know this is another question, so please just ignore it other than as possible, additional info on the first question.)
OK, here is more on this problem (if I can get my iMac to cooperate.) I executed a "script" session and will attempt to post the captured text now:
Script started on Sun 31 May 2020 03:51:24 PM PDT
stephen@CLM1001-Ubuntu:~$ whoami
stephen
stephen@CLM1001-Ubuntu:~$ pwd
/home/stephen
stephen@CLM1001-Ubuntu:~$ hostname
CLM1001-Ubuntu
stephen@CLM1001-Ubuntu:~$ uname -a
Linux CLM1001-Ubuntu 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
stephen@CLM1001-Ubuntu:~$ passwd
Changing password for stephen.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
stephen@CLM1001-Ubuntu:~$ sudo su
[sudo] password for stephen:
root@CLM1001-Ubuntu:/home/stephen# whoami
root
root@CLM1001-Ubuntu:/home/stephen# exit
exit
stephen@CLM1001-Ubuntu:~$ whoami
stephen
stephen@CLM1001-Ubuntu:~$ ./SQLbackup
./SQLbackup
Sun May 31 15:57:06 PDT 2020
/dev/sdb5 on /media/stephen/Hitachi72101Ptn5 type ext4 (rw)
/media/stephen/Hitachi72101Ptn5 is mounted
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
<snip> [note: SQLbackup is my script that runs mysqldump.]
stephen@CLM1001-Ubuntu:~$ echo "Ok, it looks like mysqldump is working."
Ok, it looks like mysqldump is working.
stephen@CLM1001-Ubuntu:~$ exit
exit
Script done on Sun 31 May 2020 03:57:35 PM PDT
THEN
I logged in as
stephen
- I can see my home directory intact
- I can
sudo su
with no problem - I can run
mysqldump
with no problem.
passwd
I changed the password for thestephen
accountI can
sudo su
with no problemmysqldump
with no problem- Via the Firefox browser, attempted to log in to phpmyadmin, but cannot log into phpmyadmin as
stephen
(regardless of which password I use) ls
still shows my home directory with no problem- rebooted the system
- Cannot log in as stephen regardless of which password I use
- Logged in to the system using a different user account
sudo su
(to root)passwd Stephen
- I set the password to the original password again for stephen account
- logoff
- log in again as Stephen: Something flashes on the screen and it does directly back to the login screen
- reboot the system again
- login as Stephen: screen flashes and goes directly back to the login screen again
- log in using the second user account
su Stephen
Signature not found in user keyring Perhaps try the interactive 'ecry0tfs-mount-private'
So the machine is dead at this point until I find a fix or restore from backup again.
Ok, so I am logged in to the problem machine again, using the second user account.
I sudo su
d (to root) then, as root, did these steps: (the second user is rootytooty.)
root@CLM1001-Ubuntu:/home/rootytooty# whoami
root
root@CLM1001-Ubuntu:/home/rootytooty# cd /
root@CLM1001-Ubuntu:/# pwd
/
root@CLM1001-Ubuntu:/# su stephen
Signature not found in user keyring
Perhaps try the interactive 'ecryptfs-mount-private'
stephen@CLM1001-Ubuntu:/$ man ecryptfs-mount-private
stephen@CLM1001-Ubuntu:/$ ecryptfs-mount-private
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
ERROR: Too many incorrect password attempts, exiting
stephen@CLM1001-Ubuntu:/$ whoami
stephen
stephen@CLM1001-Ubuntu:/$ ecryptfs-mount-private stephen
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
ERROR: Too many incorrect password attempts, exiting
I guess I go for the restore again.
By the way: /var/log/syslog
just shows the same messages that we saw in the terminal.