last day (18 days later) » 

16:52
0
Q: im trying to create a new user but it dosent work

Charlie LaineAdding user `charlie' ... Adding new group `charlie' (1002) ... Adding new user `charlie' (1001) with group `charlie' ... Creating home directory `/home/charlie' ... Stopped: chown 1001:1002 /home/charlie: Invalid argument Removing directory `/home/charlie' ... Removing user `charlie' ... Removi...

And what was the command you used to get this?
sudo adduser charlie
I wonder if there is an inconsistency in the group or passwd database? what are the outputs of sudo grpck -r and sudo pwck -rq ?
it shows nothing it just goes to the next typing part where you put your commands
What is the output of sudo egrep -i '1001|1002|charlie' /etc/{passwd,shadow,group} ?
16:52
grep: /ect/passwd: No such file or directory grep: /ect/shadow: No such file or directory grep: /ect/group: No such file or directory
@Charlie - /etc, not /ect
/etc/passwd:charlie:x:1001:1002::/home/charlie: /etc/group:chronos-access:x:1001:jeffylaine
So that is showing that user charlie already exists in /etc/passwd, but is not listed in /etc/group OR /etc/shadow. If you are sure this user should not already exist, I would sudo vi /etc/passwd and delete the charlie entry, then sudo mv /home/charlie /home/charlie.bup (just in case it is not empty), and then try the adduser again.
what do I type and where do I type it
when i did the second command it said there was no such file or directory
The 'no such file' on the mv is ok - that just means it didn't actually exists even though it was referenced in /etc/passwd. After sudo vi /etc/passwd, type /charlie and your cursor should move to the line that starts 'charlie:', then hit dd and the line should disappear. Then ZZ should quit. If at anytime you think you did something wrong in vi just do :q! to abort.
16:52
when i click dd it just added it to the end of the /charlie
I tried the adduser and now it says the user already exists
You need <cr> after /charlie -- but not after dd or ZZ. You might first try sudo deluser charlie or sudo deluser --force charlie now though -- and then use the egrep cmd again to make sure it removed it.
now it is not highlighting anything after i type /charlie but it still has the over stuff
'over stuff'? If the deluser was successful you don't need to vi /etc/passwd. You just need to get rid of the 'charlie' entry in /etc/passwd (confirm with sudo egrep -i '1001|1002|charlie' /etc/{passwd,shadow,group})
i mean the other stuff it shows
now it says it dosent exist
I tried to remake the account but it just did what I posted as the main question at the top of the page.
Try this: 1) sudo deluser --force charlie 2) sudo addgroup charlie (note the GID) 3) sudo adduser --no-create-home --gid <GID from #2> charlie 4) sudo mkdir /home/charlie 5) sudo chown charlie:charlie /home/charlie 6) sudo su - charlie 7) whoami
I've been scratching my head over the 'chown 1001:1002 /home/charlie: Invalid argument' message -- the only thing I can come up with is that /home is not a filesystem that supports owner/group settings?? What is the output of df -T /home , ls -ldZ /home , and getfacl /home ?
16:52
with number three it said -bash: GID: No such file or directory
number five said invalid user
replace "<GID from #2>" with just the GID number reported by addgroup (probably 1003)
six said no passwd entry for user charlie
3 said only one or two names allowed
last one said jeffylaine
df -T /home Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/vdb btrfs 3954108 2756484 956668 75% /
ls -ldZ /home drwxr-xr-x 1 root root ? 34 Sep 24 08:56 /home
getfacl /home -bash: getfacl: command not found
Please start over with #1, and be sure to replace "<GID from #2>" with just the GID number reported by addgroup (1002?). Don't continue on if there are errors reported at any step.
number one said user dosent exist
That's OK - it was trying to delete it anyway. Go on with #2. If #2 says group already exists, do grep charlie /etc/group and note number between the 2nd and 3rd colons for use in #3.
16:52
Can you show id Something is messed up.
 
4 hours later…
20:34
what do you mean?
number 3 said unknowen option gid1002
21:39
@CharlieLaine remember to ping the user you are answering, otherwise they won't get notified.
@Bahamut see above.
21:54
@WayneVosberg 3 said unknown option gid1002

  last day (18 days later) »