0

I made a user in Debian 11 via the GUI.  But when I try to add the user to a group via the CLI, it says that the user does not exist.  The id command in terminal does not show the user in question, but the users section in settings shows the user.  The user in question was made well in advance of trying to add to the group, and I can even log into the said user.

Edit: I ran awk -F: '{print $1}' /etc/passwd command as suggested in eyoung100's comment.  I was using the capitalized version shown in the GUI (LinuxUser1) in the usermod command tried all lower-case version (linuxuser1) shown in awk command's output, and it worked.

6
  • Please edit your question to include the output of: awk -F: '{print $1}' /etc/passwd This should list all the usernames created either manually or by the Package Manager. Lets check for typos etc. If that's not the issue we'll look at the usermod command format
    – eyoung100
    Feb 28 at 17:40
  • ty for the command/where to look the issue was i was using the capitalized version of the username ie LinuxUser1 vs the commands output of linuxuser1 Feb 28 at 20:10
  • Yes case matters, the other common one is putting the username before the groupname in the usermod command Glad I could help!
    – eyoung100
    Feb 28 at 20:13
  • 1
    HunterBentley is that new paragraph you've added (starting "edit: ran awk -F: command" a resolution? If so you should either write that an a self-answer or delete the question Feb 28 at 20:38
  • I wasn't sure how closing the question worked but didn't want to delete it up in case it helps someone else having similar problems. this was my first post on the site. Mar 1 at 16:00

1 Answer 1

0

Edit: I ran awk -F: '{print $1}' /etc/passwd command as suggested in eyoung100's comment. I was using the capitalized version shown in the GUI (LinuxUser1) in the usermod command tried all lower-case version (linuxuser1) shown in the awk command's output, and it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .