0

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
4
  • 2
    What is the output of getent passwd | grep 'cluster' – steeldriver Jul 9 '16 at 15:51
  • @steeldriver Sorry for the late reply. the output is as follows: rgcluster2blade1:x:1000:1000:RGcluster2Blade1,,,:/home/rgcluster2blade1:/bin/bash. And the 2nd line: clusteruser:x:1002:1002:clusterUser,,,:/home/clusteruser:/bin/bash – philm Jul 12 '16 at 0:27
  • 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) – steeldriver Jul 12 '16 at 0:32
  • @steeldriver Thank you for the recommendation, I updated my post. So the chown command is looking for the unix username? – philm Jul 12 '16 at 1:05
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.