how do I restore my user login

Asked by Peter Jordan on 2019-05-21

On 21 may i installed a small Ubuntu base automatic update. I carried on working without problems. The computer reported software up to date as normal. Some time later I shut down with no problem. Later the same day I went to login again only to find I was unable to do so as my user login had completely dissapeared. The system 18.04 is still working correctly as I was able to gain access under a seperate login user I had fortunately created for myself some time ago under a different name, but which have never used.
Obviously I cannot see any of my files under my main login as it has been deleted somehow by the update and though I can access my backups on my seperate hard drive Deja Dup backup will not restore my backups to a different user name. So not much help.

I can access a terminal so how do I restore my missing user login.?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2019-05-27
Last reply:
2019-05-27
Manfred Hampl (m-hampl) said : #1

Please provide more details for "my user login had completely dissapeared"
What does the screen show immediately after booting (bevor logging in)?

When logged in as the additional user, what is the output of the commands
ls -l /home
tail /etc/passwd
?

Peter Jordan (barule) said : #2

On 22/05/2019 08:13, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Please provide more details for "my user login had completely dissapeared"
> What does the screen show immediately after booting (bevor logging in)?
>
> When logged in as the additional user, what is the output of the commands
> ls -l /home
> tail /etc/passwd
> ?
>
> Hello Manfred,

thanks for the prompt reply. This issue has happened once before and i
thought it was resolved.

the information you requested is as follows:-

1. Standard boot screen appears showing "UBUNTU" with flashing
dotsbeneath asit boots all normal.

2.Normal login screen appears but instead of showing two login names
options "Austin" and "Peter Jordan" it now only shows one "Peter Jordan"

Peter Jordan is in a bright orange box with reversed out white lettering
(the normal highlighting when you have more than one selection option).

Beneath the box the words not listed appear. Remainder of the login
screen appears as normal, UBUNTU at base of screen, date top centre and
controls at top right corner.

peterjordan@austin-Z97X-Gaming-3:~$ ls -l /home
total 8
dr-x------  3        1000        1000 4096 Apr 21  2016 austin
drwxr-xr-x 21 peterjordan peterjordan 4096 May 22 10:50 peterjordan
peterjordan@austin-Z97X-Gaming-3:~$ tail /etc/passwd
i2psvc:x:122:130:I2P Router Daemon:/var/lib/i2p:/bin/false
guest-kcxlio:x:998:998:Guest:/tmp/guest-kcxlio:/bin/bash
guest-smfqz6:x:997:997:Guest:/tmp/guest-smfqz6:/bin/bash
guest-iebvzq:x:996:996:Guest:/tmp/guest-iebvzq:/bin/bash
guest-djjltv:x:995:995:Guest:/tmp/guest-djjltv:/bin/bash
guest-qvmvep:x:994:994:Guest:/tmp/guest-qvmvep:/bin/bash
cups-pk-helper:x:103:113:user for cups-pk-helper
service,,,:/home/cups-pk-helper:/usr/sbin/nologin
gdm:x:123:105:Gnome Display Manager:/var/lib/gdm3:/bin/false
gnome-initial-setup:x:124:65534::/run/gnome-initial-setup/:/bin/false
peterjordan:x:1002:1002:Peter Jordan,,,:/home/peterjordan:/bin/bash
peterjordan@austin-Z97X-Gaming-3:~$ ?
?: command not found
peterjordan@austin-Z97X-Gaming-3:~$

To clarify some of the above output. I originaly had a Guest login set
up as a third login option while we had visitors.

It was never used and so I removed it a few days ago without incident. I
can see above many references to it in the output.

hope this information helps

Manfred Hampl (m-hampl) said : #3

My interpretation of the line
"dr-x------ 3 1000 1000 4096 Apr 21 2016 austin"
is, that there once was a user-id named austin with numeric ID 1000, but for an unknown reason that user-ID has been deleted from the list of existing users.

I do not think that this has been caused by a package update.

To check my assumption, what is the output of the commands

grep austin /etc/passwd
grep 'x:100' /etc/passwd
grep austin /etc/group
grep 'x:100' /etc/group
sudo id

Peter Jordan (barule) said : #4

Hi Manfred,

here is the output you requested.

your interpretation is correct re user" Austin" that was my main login.

What confuses me greatly is how it can be possible to delete yourself
and still be working as that user. The only time I touched the user area
was to delete the user Guest and I was still working as Austin a day
after that with no problems.

This problem occurred once before when the user system seemed to get
scrambled and did not apply commands to the correct user.

1. Can I reinstate Austin if so how?.

As Austin had administrator access and Peter Jordan does not. The system
currently gives me access via user Peter Jordan but on the original
password for user Austin. If I try to change user Peter Jordan to
administrator the system won't let me into user to change it without a
password but won't accept the password it has already accepted to login
with. How confusing is that.

2. Alternatively do I take the nuclear option and reinstall 18.04
completely from the CD. If I do this will it wipe out all my files?
don't want to risk that as I have no confidence in Deja Dup backup being
able to restore my files.

peterjordan@austin-Z97X-Gaming-3:~$ grep austin /etc/passwd
peterjordan@austin-Z97X-Gaming-3:~$ grep 'x:100' etc/passwd
grep: etc/passwd: No such file or directory
peterjordan@austin-Z97X-Gaming-3:~$ grep austin /etc/group
peterjordan@austin-Z97X-Gaming-3:~$ grep 'x:100' /etc/group
users:x:100:
peterjordan:x:1002:peterjordan
peterjordan@austin-Z97X-Gaming-3:~$

On 22/05/2019 11:47, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> My interpretation of the line
> "dr-x------ 3 1000 1000 4096 Apr 21 2016 austin"
> is, that there once was a user-id named austin with numeric ID 1000, but for an unknown reason that user-ID has been deleted from the list of existing users.
>
> I do not think that this has been caused by a package update.
>
> To check my assumption, what is the output of the commands
>
> grep austin /etc/passwd
> grep 'x:100' /etc/passwd
> grep austin /etc/group
> grep 'x:100' /etc/group
> sudo id
>

Manfred Hampl (m-hampl) said : #5

Re-creating a user "austin" of course is possible, but it will need some manual workarounds.

What is the output of the commands

grep ':100' /etc/passwd
sudo id

Peter Jordan (barule) said : #6

hi Manfred,

Here is the output requested

peterjordan@austin-Z97X-Gaming-3:~$ grep ':100' /etc/passwd
systemd-timesync:x:100:102:systemd Time
Synchronization,,,:/run/systemd:/bin/false
peterjordan:x:1002:1002:Peter Jordan,,,:/home/peterjordan:/bin/bash
peterjordan@austin-Z97X-Gaming-3:~$ sudo id
[sudo] password for peterjordan:

On 22/05/2019 15:03, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Re-creating a user "austin" of course is possible, but it will need some
> manual workarounds.
>
> What is the output of the commands
>
> grep ':100' /etc/passwd
> sudo id
>

Manfred Hampl (m-hampl) said : #7

What happens if you enter the password for peterjordan at the prompt that you receive for the command

sodo id

Peter Jordan (barule) said : #8

Hi Manfred,

Here is the requested information

peterjordan@austin-Z97X-Gaming-3:~$ sudo id
[sudo] password for peterjordan:
peterjordan is not in the sudoers file.  This incident will be reported.
peterjordan@austin-Z97X-Gaming-3:~$

Comment:- The password used is the one I used to log in to the system
today. Its the one originally used for login as Austin.

On 22/05/2019 15:57, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What happens if you enter the password for peterjordan at the prompt
> that you receive for the command
>
> sodo id
>

Manfred Hampl (m-hampl) said : #9

Ok, "peterjordan" does not have admin rights.

My suggestion is to grant admin rights to that account, and then use that account during the repair activities for the "austin" account.

Proceed the same way as described in the last comment of question
https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/672653

Use the first part of the instructions in http://www.psychocats.net/ubuntu/resetpassword as starting point for reaching an administrative command prompt:
Boot your computer in recovery mode (by pressing the shift key during bootup) and then selecting advanced mode and root command prompt (the line to select nowadays probably reads "Advanced options for Ubuntu").
When you got a command prompt (probably "root@austin-Z97X-Gaming-3:~" issue the command
mount -o rw,remount /
and then issue the command
usermod -aG sudo peterjordan
and finally resume normal operations with
exit
and selecting "resume" in the menu.

If you then log in as "peterjordan", you should have admin rights (verify with the command "sudo id").

Re-creating the "admin" user account is a second step to be done afterwards.

Peter Jordan (barule) said : #10

Hi Manfred,

Done all that.

sudo id requested password so used current password and system returned
the following.

peterjordan@austin-Z97X-Gaming-3:~$ sudo id
[sudo] password for peterjordan:
uid=0(root) gid=0(root) groups=0(root)
peterjordan@austin-Z97X-Gaming-3:~$

On 22/05/2019 17:07, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Ok, "peterjordan" does not have admin rights.
>
> My suggestion is to grant admin rights to that account, and then use
> that account during the repair activities for the "austin" account.
>
> Proceed the same way as described in the last comment of question
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/672653
>
> Use the first part of the instructions in http://www.psychocats.net/ubuntu/resetpassword as starting point for reaching an administrative command prompt:
> Boot your computer in recovery mode (by pressing the shift key during bootup) and then selecting advanced mode and root command prompt (the line to select nowadays probably reads "Advanced options for Ubuntu").
> When you got a command prompt (probably "root@austin-Z97X-Gaming-3:~" issue the command
> mount -o rw,remount /
> and then issue the command
> usermod -aG sudo peterjordan
> and finally resume normal operations with
> exit
> and selecting "resume" in the menu.
>
> If you then log in as "peterjordan", you should have admin rights
> (verify with the command "sudo id").
>
> Re-creating the "admin" user account is a second step to be done
> afterwards.
>

Manfred Hampl (m-hampl) said : #11

Ok, fine.

I suggest that you start checking, whether "austin's" file are still there:

If you do the command

sudo ls -l /home/austin

and based on that with some subdirectories (change the name according to the output of the previous command):

sudo ls -l /home/austin/Documents
sudo ls -l /home/austin/Music

do you see the files that should be there?
(No need to copy/paste the contents into this question document)

Peter Jordan (barule) said : #12

Hi Manfred,

Bad news the first command returned 0  second command returned no such
file or directory.

On 22/05/2019 17:52, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Ok, fine.
>
> I suggest that you start checking, whether "austin's" file are still
> there:
>
> If you do the command
>
> sudo ls -l /home/austin
>
> and based on that with some subdirectories (change the name according to
> the output of the previous command):
>
> sudo ls -l /home/austin/Documents
> sudo ls -l /home/austin/Music
>
> do you see the files that should be there?
> (No need to copy/paste the contents into this question document)
>

Manfred Hampl (m-hampl) said : #13

In this case you have to restore the files from you backups, but the user account has to be re-created first.

I hope that the following commands will create a new user "austin" that is sufficiently similar to the old one:

sudo addgroup --gid 1000 austin

sudo adduser --home /home/austin --shell /bin/bash --uid 1000 --gid 1000 --gecos austin austin

sudo usermod -aG sudo austin

sudo passwd austin

(The last command will ask for a new password for the "austin" user)

When this is done, you should be able to log off from "peterjordan" and log in to "austin".
If this does not work, then please log to to "peterjordan" again.

Peter Jordan (barule) said : #14

hi Manfred,

addgroupe worked. adduser returned" Only one or two names allowed".

Then usermod returns user austin does not exist. So didnt proceed to
fourth command.

On 22/05/2019 18:57, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> In this case you have to restore the files from you backups, but the
> user account has to be re-created first.
>
> I hope that the following commands will create a new user "austin" that
> is sufficiently similar to the old one:
>
> sudo addgroup --gid 1000 austin
>
> sudo adduser --home /home/austin --shell /bin/bash --uid 1000 --gid 1000
> --gecos austin austin
>
> sudo usermod -aG sudo austin
>
> sudo passwd austin
>
> (The last command will ask for a new password for the "austin" user)
>
> When this is done, you should be able to log off from "peterjordan" and log in to "austin".
> If this does not work, then please log to to "peterjordan" again.
>

Manfred Hampl (m-hampl) said : #15

Please provide the full text of the command that you executed and the error message - as shown on screen.

Peter Jordan (barule) said : #16

peterjordan@austin-Z97X-Gaming-3:~$ sudo adduser --home /home/austin
--shell /bin/bash --uid 1000 --gid 1000
adduser: Only one or two names allowed.
peterjordan@austin-Z97X-Gaming-3:~$ sudo usermod -aG sudo austin
usermod: user 'austin' does not exist
peterjordan@austin-Z97X-Gaming-3:~$

On 22/05/2019 19:47, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Please provide the full text of the command that you executed and the
> error message - as shown on screen.
>

Manfred Hampl (m-hampl) said : #17

You missed half of the command

Peter Jordan (barule) said : #18

Sincere apologies Manfred,

its been a long frustrating day.

executed correct commands and entered new password as requested.

Adding new user `austin' (1000) with group `austin' ...
The home directory `/home/austin' already exists.  Not copying from
`/etc/skel'.
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

How do we proceed from here as it seems my files are still there.

On 22/05/2019 19:57, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> You missed half of the command
>

Manfred Hampl (m-hampl) said : #19

Can you now log in with user "austin"?

If yes, what is the output of the commands

sudo id
ls -la ~

Peter Jordan (barule) said : #20

Hi Manfred,

The austin login is back but it would not accept the new password so
could not go further.

Do I need to  go back to the psychocats link you gave me and use it to
reset the password for austin again.

On 22/05/2019 20:17, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Can you now log in with user "austin"?
>
> If yes, what is the output of the commands
>
> sudo id
> ls -la ~
>

Manfred Hampl (m-hampl) said : #21

You can log in to the "peterjordan" user to reset the password for "austin".
Use the command

sudo passwd austin

Peter Jordan (barule) said : #22

have now reset the passwd for austin twice very carefully and I still
cannot login on austin.

system accepts the new passwd but  it appears does not link it to austin
login.

On 22/05/2019 20:52, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> You can log in to the "peterjordan" user to reset the password for "austin".
> Use the command
>
> sudo passwd austin
>

Manfred Hampl (m-hampl) said : #23

What exactly happens when you try logging in to the "austin" user?
Do you receive an error message about bad password, or do you just see some kind of screen flicker and you are thrown back to the login page, or ... ?

Peter Jordan (barule) said : #24

I have had both.

The first few times after passwd reset it told me the password was
incorrect. Since then I have rebooted and now I get the later, a screen
blank for a second or two and then thrown back to the login page

On 23/05/2019 13:37, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What exactly happens when you try logging in to the "austin" user?
> Do you receive an error message about bad password, or do you just see some kind of screen flicker and you are thrown back to the login page, or ... ?
>

Manfred Hampl (m-hampl) said : #25

The inability to log in as "austin" may be caused by wrong file protection settings on the home directory.

Issue the command (as "peterjordan")

sudo chmod 700 /home/austin/

To verify the status, what is the output of the command

ls -la /home

after the previous command?

And finally re-try logging in as user "austin".

Peter Jordan (barule) said : #26

output as requested

peterjordan@austin-Z97X-Gaming-3:~$ sudo chmod 700 /home/austin/
[sudo] password for peterjordan:
peterjordan@austin-Z97X-Gaming-3:~$ ls -la /home
total 20
drwxr-xr-x  5 root        root        4096 May 21 00:15 .
drwxr-xr-x 24 root        root        4096 May 21 15:05 ..
drwx------  3 austin      austin      4096 Apr 21  2016 austin
drwxr-xr-x  3 root        root        4096 Apr 21  2016 .ecryptfs
drwxr-xr-x 21 peterjordan peterjordan 4096 May 23 12:02 peterjordan
peterjordan@austin-Z97X-Gaming-3:~$

That seems to have done the trick Manfred. I can now login to austin.

However the desktop appears as if a new installation and folders are empty.

There is a notifcation  file which states "This directory has been
unmounted to  protect your data.

from the graphical desktop click onAccess your private data

or

 From the command line run

ecryptfs-mount-private"

should I run sudo ecryptfs-mount-private ?

On 23/05/2019 17:08, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> The inability to log in as "austin" may be caused by wrong file
> protection settings on the home directory.
>
> Issue the command (as "peterjordan")
>
> sudo chmod 700 /home/austin/
>
> To verify the status, what is the output of the command
>
> ls -la /home
>
> after the previous command?
>
> And finally re-try logging in as user "austin".
>

Manfred Hampl (m-hampl) said : #27

I do not have experience with encrypted directories or file systems, so I cannot really give advice with that. But it seems reasonable to execute the command that is proposed by the system.

Peter Jordan (barule) said : #28

I ran the command as the system suggested.

It asked for austin password which I entered.

Nothing happened, then the system returned "austin is not in the sudoers
file  this matter will be reported".

How can that be if its accepting the password and letting me in. How do
we add austin to sudoers file.

On 23/05/2019 19:33, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> I do not have experience with encrypted directories or file systems, so
> I cannot really give advice with that. But it seems reasonable to
> execute the command that is proposed by the system.
>

Manfred Hampl (m-hampl) said : #29

Adding "austin" to the sudoers file is done with the command

sudo usermod -aG sudo austin

(to be executed as "peterjordan"!)

It was already on the list of commands to be executed, but did not work due to an error in the command preceding it.
So execute this command now and try again.

Peter Jordan (barule) said : #30

have run command again in both austin and in peter Jordan. Command
accepted in peter Jordan but in austin still the same response austin
not in sudoers file.

While in austin I tried to open my separate backup hard drive which
showed on austin desktop. when I did so the system asked me for my
password but not the one for austin it asked me for the one for Peter
Jordan. Which indicates the system still is confused in handling its users.

so still no file access but all the apps are there.

On 23/05/2019 20:37, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Adding "austin" to the sudoers file is done with the command
>
> sudo usermod -aG sudo austin
>
> (to be executed as "peterjordan"!)
>
> It was already on the list of commands to be executed, but did not work due to an error in the command preceding it.
> So execute this command now and try again.
>

Manfred Hampl (m-hampl) said : #31

It seems to me that you are misinterpreting some aspects of the password handling in Ubuntu (or UNIX systems in general).
The system will never check whether the password entered for one user is the password for a different user.

For diagnostic purposes please log off from the "austin" user, log in again with "austin" and then provide the output of the following commands:

grep ALL /etc/sudoers
groups
sudo id

Peter Jordan (barule) said : #32

I was not misinterpreting. I merely reported what happened. I endeavoured to replicate the error today with my wife as witness. This time in austin when attempting access to my backup hard drive it asked for the correct austin password.

Then while still in the desktop window I noticed we now had two file system icons. Clicked the first icon files window opened as normal but still no files. Clicked on the second icon and it opened the files window but kept opening duplicates of the same window each time I clicked on it. logged out and back in again and the second icon was gone. So the system is capable of strange things of its own accord.

To return to the point you made regarding what the system does with passwords I can only guess this happened because the backup hard drive was mounted under Peter Jordan and not austin at the time. But I am no expert in this system as you know

Data as requested.

Your question #680982 on Ubuntu changed:
austin@austin-Z97X-Gaming-3:~$ sudo grep ALL /etc/sudoers
[sudo] password for austin:
root ALL=(ALL:ALL) ALL
%admin ALL=(ALL) ALL
%sudo ALL=(ALL:ALL) ALL
austin@austin-Z97X-Gaming-3:~$ groups
austin sudo
austin@austin-Z97X-Gaming-3:~$ sudo id
uid=0(root) gid=0(root) groups=0(root)
austin@austin-Z97X-Gaming-3:~$

On 24/05/2019 08:09, Manfred Hampl wrote:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> It seems to me that you are misinterpreting some aspects of the password handling in Ubuntu (or UNIX systems in general).
> The system will never check whether the password entered for one user is the password for a different user.
>
> For diagnostic purposes please log off from the "austin" user, log in
> again with "austin" and then provide the output of the following
> commands:
>
> grep ALL /etc/sudoers
> groups
> sudo id
>

Manfred Hampl (m-hampl) said : #33

Back to the step that caused us checking and re-granting sudo rights:

Do you still see a message about ecryptfs-mount-private?

What is the output of the command
ls -la /home/.ecryptfs

Peter Jordan (barule) said : #34

Yes message is still present. on examining its properties:-

its owner is root as confirmed below . Then it says I am not the owner
so can't change the permissions.

Its a link to the desktop config file...

link target /usr/share/ecryptfs-utils/ecrypt...

modified 23 may 17.47

size 220 bytes

Don't know if any of this info helps.

incidentally on login to austin again just now duplicate file system
icon is back.

austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/ .ecryptfs
[sudo] password for austin:
lrwxrwxrwx 1 austin austin   32 Apr 21  2016 .ecryptfs ->
/home/.ecryptfs/austin/.ecryptfs

/home/:
total 20
drwxr-xr-x  5 root        root        4096 May 21 00:15 .
drwxr-xr-x 24 root        root        4096 May 21 15:05 ..
drwx------ 17 austin      austin      4096 May 24 15:57 austin
drwxr-xr-x  3 root        root        4096 Apr 21  2016 .ecryptfs
drwxr-xr-x 21 peterjordan peterjordan 4096 May 24 13:11 peterjordan
austin@austin-Z97X-Gaming-3:~$

On 24/05/2019 15:08, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Back to the step that caused us checking and re-granting sudo rights:
>
> Do you still see a message about ecryptfs-mount-private?
>
> What is the output of the command
> ls -la /home/.ecryptfs
>

Manfred Hampl (m-hampl) said : #35

What is the output of the commands

ls -la /home/.ecryptfs
ls -la /home/.ecryptfs/austin
ls -la /home/.ecryptfs/austin/.ecryptfs

and what happens when you execute the command

ecryptfs-mount-private

Peter Jordan (barule) said : #36

Data as requested.

austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/ .ecryptfs
[sudo] password for austin:
lrwxrwxrwx 1 austin austin   32 Apr 21  2016 .ecryptfs ->
/home/.ecryptfs/austin/.ecryptfs

/home/:
total 20
drwxr-xr-x  5 root        root        4096 May 21 00:15 .
drwxr-xr-x 24 root        root        4096 May 21 15:05 ..
drwx------ 17 austin      austin      4096 May 24 15:57 austin
drwxr-xr-x  3 root        root        4096 Apr 21  2016 .ecryptfs
drwxr-xr-x 21 peterjordan peterjordan 4096 May 24 13:11 peterjordan
austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/ .ecryptfs/austin
ls: cannot access '.ecryptfs/austin': No such file or directory
/home/:
total 20
drwxr-xr-x  5 root        root        4096 May 21 00:15 .
drwxr-xr-x 24 root        root        4096 May 21 15:05 ..
drwx------ 17 austin      austin      4096 May 24 15:57 austin
drwxr-xr-x  3 root        root        4096 Apr 21  2016 .ecryptfs
drwxr-xr-x 21 peterjordan peterjordan 4096 May 24 13:11 peterjordan
austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/ .ecryptfs/austin/
.ecryptfs
ls: cannot access '.ecryptfs/austin/': No such file or directory
lrwxrwxrwx 1 austin austin   32 Apr 21  2016 .ecryptfs ->
/home/.ecryptfs/austin/.ecryptfs

/home/:
total 20
drwxr-xr-x  5 root        root        4096 May 21 00:15 .
drwxr-xr-x 24 root        root        4096 May 21 15:05 ..
drwx------ 17 austin      austin      4096 May 24 15:57 austin
drwxr-xr-x  3 root        root        4096 Apr 21  2016 .ecryptfs
drwxr-xr-x 21 peterjordan peterjordan 4096 May 24 13:11 peterjordan
austin@austin-Z97X-Gaming-3:~$

On 24/05/2019 17:47, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What is the output of the commands
>
> ls -la /home/.ecryptfs
> ls -la /home/.ecryptfs/austin
> ls -la /home/.ecryptfs/austin/.ecryptfs
>
> and what happens when you execute the command
>
> ecryptfs-mount-private
>

Manfred Hampl (m-hampl) said : #37

Why do you put a space character into the middle of the commands?
Please execute them as they are.

Peter Jordan (barule) said : #38

Sorry eyesight failure.

This should be correct

austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/.ecryptfs
[sudo] password for austin:
total 12
drwxr-xr-x 3 root   root   4096 Apr 21  2016 .
drwxr-xr-x 5 root   root   4096 May 21 00:15 ..
drwxr-xr-x 4 austin austin 4096 Apr 21  2016 austin
austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/.ecryptfs/austin
total 24
drwxr-xr-x  4 austin austin  4096 Apr 21  2016 .
drwxr-xr-x  3 root   root    4096 Apr 21  2016 ..
drwx------  2 austin austin  4096 Apr 21  2016 .ecryptfs
drwx------ 41 austin austin 12288 May 21 00:16 .Private
austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/.ecryptfs/austin/.ecryptfs
total 20
drwx------ 2 austin austin 4096 Apr 21  2016 .
drwxr-xr-x 4 austin austin 4096 Apr 21  2016 ..
-rw-r--r-- 1 austin austin    0 Apr 21  2016 auto-mount
-rw-r--r-- 1 austin austin    0 Apr 21  2016 auto-umount
-rw------- 1 austin austin   13 Apr 21  2016 Private.mnt
-rw------- 1 austin austin   34 Apr 21  2016 Private.sig
-rw------- 1 austin austin   58 Apr 21  2016 wrapped-passphrase
-rw-rw-r-- 1 austin austin    0 Apr 21  2016 .wrapped-passphrase.recorded
austin@austin-Z97X-Gaming-3:~$

On 24/05/2019 17:47, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What is the output of the commands
>
> ls -la /home/.ecryptfs
> ls -la /home/.ecryptfs/austin
> ls -la /home/.ecryptfs/austin/.ecryptfs
>
> and what happens when you execute the command
>
> ecryptfs-mount-private
>

Manfred Hampl (m-hampl) said : #39

What is now the output of

ls -la /home/.ecryptfs/austin/.Private

and (already asked before) what happens when you execute the command

ecryptfs-mount-private

Peter Jordan (barule) said : #40

austin@austin-Z97X-Gaming-3:~$ sudo ls -la /home/.ecryptfs/austin/.private
[sudo] password for austin:
ls: cannot access '/home/.ecryptfs/austin/.private': No such file or
directory
austin@austin-Z97X-Gaming-3:~$

This is what I get

austin@austin-Z97X-Gaming-3:~$ sudo ecryptfs-mount-private
[sudo] password for austin:
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:

Entered my new austin password. Didn't like it. Is it wanting the
original austin password?.

On 24/05/2019 19:52, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What is now the output of
>
> ls -la /home/.ecryptfs/austin/.Private
>
> and (already asked before) what happens when you execute the command
>
> ecryptfs-mount-private
>

Manfred Hampl (m-hampl) said : #41

1. Why don't you use copy and paste for the commands? You again scrambled it.

2. The passphrase that you have to provide probably is the old password that "austin" had a few days ago.

Manfred Hampl (m-hampl) said : #42

3. Why to you put "sudo" in front of the commands? I on purposes did not tell you to do that.

Peter Jordan (barule) said : #43

1. I type the commands because I am trying to learn them. Please tell me
where I scrambled the commands.

2. Am quite capable of cut and paste will do so to the letter from now on.

Here they are repeated.

3. this time I used the old password.

austin@austin-Z97X-Gaming-3:~$ ls -la /home/.ecryptfs
total 12
drwxr-xr-x 3 root   root   4096 Apr 21  2016 .
drwxr-xr-x 5 root   root   4096 May 21 00:15 ..
drwxr-xr-x 4 austin austin 4096 Apr 21  2016 austin
austin@austin-Z97X-Gaming-3:~$ ls -la /home/.ecryptfs/austin
total 24
drwxr-xr-x  4 austin austin  4096 Apr 21  2016 .
drwxr-xr-x  3 root   root    4096 Apr 21  2016 ..
drwx------  2 austin austin  4096 Apr 21  2016 .ecryptfs
drwx------ 41 austin austin 12288 May 21 00:16 .Private
austin@austin-Z97X-Gaming-3:~$ ls -la /home/.ecryptfs/austin/.ecryptfs
total 20
drwx------ 2 austin austin 4096 Apr 21  2016 .
drwxr-xr-x 4 austin austin 4096 Apr 21  2016 ..
-rw-r--r-- 1 austin austin    0 Apr 21  2016 auto-mount
-rw-r--r-- 1 austin austin    0 Apr 21  2016 auto-umount
-rw------- 1 austin austin   13 Apr 21  2016 Private.mnt
-rw------- 1 austin austin   34 Apr 21  2016 Private.sig
-rw------- 1 austin austin   58 Apr 21  2016 wrapped-passphrase
-rw-rw-r-- 1 austin austin    0 Apr 21  2016 .wrapped-passphrase.recorded
austin@austin-Z97X-Gaming-3:~$ ecryptfs-mount-private
Enter your login passphrase:
Inserted auth tok with sig [c89f99d015e27e5a] into the user session keyring

INFO: Your private directory has been mounted.
INFO: To see this change in your current shell:
   cd /home/austin

austin@austin-Z97X-Gaming-3:~$

On 24/05/2019 21:27, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Manfred Hampl posted a new comment:
> 3. Why to you put "sudo" in front of the commands? I on purposes did not
> tell you to do that.
>

Peter Jordan (barule) said : #44

The system accepted the old password and I can access the files now.
Where does this leave me in respect of login  passwords do I continue to
use the new password or do I  have to keep using the old one.

Now the Keyring has accepted the old password does it become defunct and
just the new password will apply.

On 24/05/2019 21:27, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Manfred Hampl posted a new comment:
> 3. Why to you put "sudo" in front of the commands? I on purposes did not
> tell you to do that.
>

Manfred Hampl (m-hampl) said : #45

You have to distinguish between the "password" used for logging in and for gaining administrator authorizations with the sudo command, and the "passphrase" that is used for unlocking your encrypted home directory.
When you set up a new user with encrypted home directory, you usually use the same word for both purposes, but that is not a strict requirement.
Now, that you have set a different password to the "austin" user, these two apparently differ.

What you could try is re-setting the password of the "austin" user back to the value that it was, making it identical to the passphrase for unlocking the home directory.
(This is to be done with the command "passwd" without any additional options).

Where did you scramble a command?
You changed .Private into .private

Peter Jordan (barule) said : #46

Hello Manfred,

Thanks for the comments,

I am assuming that if I set the password back to the old password I will
still have to enter it twice. Once to confirm my login and a second time
to unlock the encrypted private folder. Its not an issue to use two
different passwords for access to the my files.

As I have opened and copied my private files to a separate USB hard
drive for backup purposes I have several options I can consider.

1. Do I completely reinstall 18.04 from DVD.

2. Open the encrypted files and somehow copy them back into the same
home folder, though I am unsure quite how this would work.

3. Leave things as they are and put up with the manual mounting of the
private file folder each time.

On a separate note you have highlighted a problem I have with LInux
command entry in general I keep seeing spaces that are not there
particularly in the file path after the entry of a backslash and dot eg .

ls -la/home/.ecryptfs/austin/.Private.

Now that i am aware of it I will watch out for it in the future. I think
the typeface exagerates the non existant space a lot.

Am I right in saying there are never any spaces in any linux path parts
of commands.

There does appear to be a space between  the command and options
enteries eg  between" ls " and "-la" above.

Your general advice on this would be appreciated.

Finally my sincere thanks for your patience in solving this long drawn
out problem mostly of my making.

I am not available for the next 30 days but will digest the above and
may come back to you in the future on this matter.

On 25/05/2019 14:02, Manfred Hampl wrote:
> Your question #680982 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/680982
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> You have to distinguish between the "password" used for logging in and for gaining administrator authorizations with the sudo command, and the "passphrase" that is used for unlocking your encrypted home directory.
> When you set up a new user with encrypted home directory, you usually use the same word for both purposes, but that is not a strict requirement.
> Now, that you have set a different password to the "austin" user, these two apparently differ.
>
> What you could try is re-setting the password of the "austin" user back to the value that it was, making it identical to the passphrase for unlocking the home directory.
> (This is to be done with the command "passwd" without any additional options).
>
> Where did you scramble a command?
> You changed .Private into .private
>

Manfred Hampl (m-hampl) said : #47

Just a quick answer with a remark about commands, options and parameters:

Commands can consist of several parts:
1. There is the command itself (e.g. "ls", "grep", ...)
2. there may be options, usually starting with a single "minus" character, each option usually being just a single character itself, but often combined (e.g. "-la" being "l" as option for long and "a" as otion for "all" with the "ls" command)
3. "long" options starting with two minus characters (e.g. "--verbose")
4. one or more parameters (like the name for the directory to be listed with the "ls" command). These should not have embedded space characters, respectively they have to be put in quotes if they contains space characters.

Between the command name, each of the options and each of the parameters there has to be (at least) a space character.

So the command that you used above is wrong, because it lacks the space character between option and parameter.
It should have been
ls (space) -la (space) /home/.ecryptfs/austin/.Private

And as an additional caveat: Unix Systems are case sensitive, so there is a difference between .private and .Private

Can you help with this problem?

Provide an answer of your own, or ask Peter Jordan for more information if necessary.

To post a message you must log in.