Invalid user error using chown

39,036

According to your passwd file, the username is clusteruser with a real name of clusterUser (clusteruser:...:clusterUser...). chown cares only about the username, which has no capital letters.

Use chown clusteruser.

Share:
39,036

Related videos on Youtube

philm
Author by

philm

Updated on September 18, 2022

Comments

  • philm
    philm almost 2 years

    I am running into an issue where when I type in sudo chown, I am recieving an invalid user error.

    I created a user called clusterUser using the GUI. In the root directory of the computer (/), I created a folder called clusterFiles. I would like to change the home directory of clusterUser to be clusterFiles. I am using this set of commands to change the home directory:

    sudo chown clusterUser /clusterFiles
    sudo usermod -d /clusterFiles clusterUser
    

    However, when I run the command sudo chown clusterUser /clusterFiles, I get the error invalid user clusterUser.

    I know that I have created it becuase I logged into it. Is there something wrong with how I formatted the command?

    Edit:

    The output of getent passwd | grep 'cluster' yeilds:

    rgcluster2blade1:x:1000:1000:RGcluster2Blade1,,,:/home/rgcluster2blade1:/bin/bas‌​h
    clusteruser:x:1002:1002:clusterUser,,,:/home/clusteruser:/bin/bash
    
    • steeldriver
      steeldriver almost 8 years
      What is the output of getent passwd | grep 'cluster'
    • philm
      philm almost 8 years
      @steeldriver Sorry for the late reply. the output is as follows: rgcluster2blade1:x:1000:1000:RGcluster2Blade1,,,:/home/rgclu‌​ster2blade1:/bin/bas‌​h. And the 2nd line: clusteruser:x:1002:1002:clusterUser,,,:/home/clusteruser:/bi‌​n/bash
    • steeldriver
      steeldriver almost 8 years
      Would be much easier to decode if you edit it into your Q but it looks to me like you're confusing the GECOS 'full name' (clusterUser - mixed case) with the actual Unix username clusteruser (all lower case)
    • philm
      philm almost 8 years
      @steeldriver Thank you for the recommendation, I updated my post. So the chown command is looking for the unix username?