Ubuntu Linux sudo groupadd option menu keeps showing

3

I'm a beginner to Ubuntu and Linux. Every time I try to do a groupadd in my Ubuntu terminal the options for groupadd show up and I dont know why.

I enter this in my home directory:

sudo groupadd –g 1125 groupname

Then I search for this and get nothing:

grep -i “groupname″ /etc/group

as well as this:

grep -i “1125" /etc/group

Why can't I make this group?

Alex

Posted 2014-04-07T19:49:21.760

Reputation: 27

please update your question to include the command you ran and the output / error message. – Panther – 2014-04-07T19:54:58.960

Well the command is sudo groupadd –g 1125 groupname. The weird part is I don't get an exit value or an error, I get an options menu every time. – Alex – 2014-04-07T19:59:53.927

Try running echo $? after to see the exit status. man groupadd has a description of what the errors mean. – ssmy – 2014-04-07T20:27:20.893

Answers

3

Where did you copy and paste that from? If that is the exact command you are using then your problem is that your is not actually a hyphen, that is a dash character. I am betting you copied from a blog or MS office or something, which automatically changed the hyphen to a unicode dash.

Heck just adjust the zoom level of your browser and look at the difference between the - used in your sudo -i and the used in your groupadd –g. They are different lengths and widths (assuming you aren't using some unusual font).

Zoredache

Posted 2014-04-07T19:49:21.760

Reputation: 18 453

Wow, you're right. I copied it from a tutorial blog somewhere, I guess I learned my lesson. I'd upvote you but I have no reputation unfortunately. Edit: Upvoted! – Alex – 2014-04-07T20:33:06.920