in reply to Re^9: [OT] A New Everything ?
in thread [OT] A New Everything ?

"Home is supposed to be empty, or a copy of /etc/skel/. How should the operating system know what you want to put there?"

Aldebaran is telling you that /home/fred does not exist.

marto@Marto-Desktop:~$ sudo useradd fred [sudo] password for marto: Sorry, try again. [sudo] password for marto: marto@Marto-Desktop:~$ sudo passwd fred New password: Retype new password: passwd: password updated successfully marto@Marto-Desktop:~$ ls -al /home total 12 drwxr-xr-x 3 root root 4096 May 12 15:05 . drwxr-xr-x 20 root root 4096 May 12 15:04 .. drwxr-xr-x 56 marto marto 4096 Sep 23 10:32 marto marto@Marto-Desktop:~$ su - fred Password: su: warning: cannot change directory to /home/fred: No such file or di +rectory $ ^C

As previously stated useradd was not being called with the correct arguments to create /home/fred, which would have been useradd -m fred thus creating the directory and copying the files from /etc/skel.

Replies are listed 'Best First'.
Re^11: [OT] A New Everything ?
by afoken (Canon) on Sep 25, 2020 at 06:30 UTC
    Aldebaran is telling you that /home/fred does not exist.

    You are right, I misread that part.

    Update: I misread "home" as $ENV{HOME} instead of /home, and I used "home" in my previous answer to mean $ENV{HOME}, not /home.


    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Aldebaran is telling you that /home/fred does not exist.

      That did throw me for my first of many "what the heck" moments. I soon created barney with the right command. I misunderstood a good handful of things in trying to get barney's ssh squared away, so I moved on to wilma. I needed to have directories and files set with proper ownership, e.g. wilma needs to own .ssh . One thing I was reading wrong was that I thought authorized_keys was a directory that contained files. Not so.

      We're getting deep down into the weeds of this thread, and I've gotten a lot of great help on a nebulus and moving target, but we get fewer eyes down here, and I don't want to punish the people who are helping me by keeping it going forever. I'm close with wilma and I think I'm gonna get over on betty. Here's my latest attempt with wilma:

      Thanks all for comments.

        root@third:/home/wilma/.ssh# echo >>authorized_keys

        The authorized_keys file is not a list of filenames; it is a list of keys themselves. At this point you should just have done something akin to

        $ cat > authorized_keys



        You'd have saved yourself a lot of time and effort if you'd read the DigitalOcean tutorials on this subject.