Invalid user error using chown
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
.
Related videos on Youtube
philm
Updated on September 18, 2022Comments
-
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/bash clusteruser:x:1002:1002:clusterUser,,,:/home/clusteruser:/bin/bash
-
steeldriver almost 8 yearsWhat is the output of
getent passwd | grep 'cluster'
-
philm almost 8 years@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
-
steeldriver almost 8 yearsWould 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 usernameclusteruser
(all lower case) -
philm almost 8 years@steeldriver Thank you for the recommendation, I updated my post. So the chown command is looking for the unix username?
-