LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   point out the problem with this command (https://www.linuxquestions.org/questions/linux-newbie-8/point-out-the-problem-with-this-command-209829/)

bahadur 07-26-2004 11:14 AM

point out the problem with this command
 
HI,

i am trying to configure squid and i read in an article that it is better to create a user squid in the system .

the article gave the command for creating a user named squid as follows.

# adduser --system --disabled-password --disabled-login --no-create-home --group squid

but when i press enter this is the error it gives me

adduser: invalid option -- -
usage: adduser [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
adduser -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]


can any one plz tell me how to fix the command so that a user squid is created with no home directory , no login, no password.

Dark_Helmet 07-26-2004 11:50 AM

I think this is what you need:

adduser -M -n -r -s /bin/false squid

However, I would suggest double-checking the options (man adduser). There are no standard "long options" such as --system or --no-create-home to my knowledge, and none are mentioned in the man pages.

Veladrin 07-26-2004 11:50 AM

Re: point out the problem with this command
 
Quote:

Originally posted by bahadur
HI,

i am trying to configure squid and i read in an article that it is better to create a user squid in the system .

the article gave the command for creating a user named squid as follows.

# adduser --system --disabled-password --disabled-login --no-create-home --group squid

but when i press enter this is the error it gives me

adduser: invalid option -- -
usage: adduser [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
adduser -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]


can any one plz tell me how to fix the command so that a user squid is created with no home directory , no login, no password.

okay, so the user is going into the 'system' group?

try something like this

adduser -g system -s /bin/false -r squid


This will put them into group system, not give them a shell access. The -r gives them a low userid for admin accounts (meaning they won't have a password expiring - see 'man' for more details). Finally it gives them the username squid.

I'm not sure if it'll let you do it without a password, and surely you'd be better giving it a password anyway?


All times are GMT -5. The time now is 08:08 PM.