[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adduser only one or. two users



On Thu, 4 Aug 2022 13:23:11 -0400
Dan Ritter <dsr@randomstring.org> wrote:

> sudo adduser --shell $USERSHELLPATH --disabled-password --gecos ""
> $USERNAME
> 
> That's your first command line. --gecos expects a value. You are
> literally supplying no value.
> 
> Why don't you leave the --gecos "" out entirely, if you aren't
> going to populate it with a human-readable name?

I'll second this one, and add, you should quote variable names in order
to avoid spaces in the variables screwing things up. So: "$USERNAME",
not $USERNAME. What happens if the user name is Fred Flintstone?

Of course we don't see how, if at all, you've qualified your inputs so
this suggestion may be moot.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: