NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Korack's avatar
Korack
Aspirant
Mar 27, 2021

How to recreate user home share?

Somehow I deleted all the users home directories and I cannot recreate them via command line.

I have already shares with the users names for example \\ReadyNAS214\Bob which is located at /data/Bob but /home/bob does not exist. As root/admin am not allowed to create a new one.  This is only an issue if the user wants to ftp or ssh into the NAS.

 

I've tried many options but cannot seem to find a way to fix it. I even attempt to change the home directory in /etc/passwd which works for a while. For example, I changed Bob's home from /home/bob to /data/Bob which worked but is eventually reset to /home/bob but /home/bob does not exist. Is there a tool to recreate the end user's home directory?

 

Thanks in advance for any help.

 

Cannot recreate home or import ssh keys

12 Replies

Replies have been turned off for this discussion
  • StephenB's avatar
    StephenB
    Guru - Experienced User

    Korack wrote:

    Somehow I deleted all the users home directories and I cannot recreate them via command line.

    I have already shares with the users names for example \\ReadyNAS214\Bob which is located at /data/Bob but /home/bob does not exist. 

    No idea how you deleted them.

     

    But as far as recreating them goes: You can't have two shares with the same name (and the home folder is a share, just locked down). SMB is case-insensitive, so Bob and bob are treated as the same name.

     

    First,  delete the Bob share. 

     

    Then try accessing the NAS with Bob's user credentials via SMB - e.g., using File Explorer (Windows) or Finder (MacOS).  Alternatively, log in with ssh (as root) and enter rnutil mkhomedir_helper Bob .  Match the case of the actual user account (e.g., enter bob if the username is lowercase).

     

    • Korack's avatar
      Korack
      Aspirant

      Thanks for the reply. I deleted the share Bob. Tried logging in via SMB & ssh as "bob", It still does not create /home/bob.

      Your command was helpful but did not actually fix it.

       

      I get the following error:

      # rnutil mkhomedir_helper bob
      INFO: Checking homedir for user bob
      ERROR: /home is on the root fs.

       

      FYI - I deleted the home directories with a bad rsync command. Funny I could delete the directories but not create them.

       

      • StephenB's avatar
        StephenB
        Guru - Experienced User

        Korack wrote:

        I get the following error:

        # rnutil mkhomedir_helper bob
        INFO: Checking homedir for user bob
        ERROR: /home is on the root fs.

         

        FYI - I deleted the home directories with a bad rsync command. Funny I could delete the directories but not create them.

         


        Does /data/home exist?  I am guessing not, but we should confirm.

         

        /home is a mount point for /data/home - and I think the error message is telling you that /data/home is not mounted on /home.

         

         

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More