at http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to+building+OpenPBX.o...
there is the following adduser command:
adduser --no-create-home --ingroup openpbx --disabled-password --disabled-login openpbx
This does NOT seem to be the right format for Centos. So far, using man, I have come up with;
adduser -M -g openpbx
What else do I need?
I believe that if you do not provide the -m switch it will not create a user home dir. They will be placed in a group that is the same as their username. If you are creating a service account then you should probably give the user a null shell using -s /sbin/nologin. And if you do not specify a password the account is disabled. This give's you:
useradd -s /sbin/nologin openpbx
That should do it!
On 3/9/07, Robert Moskowitz rgm@htt-consult.com wrote:
at
http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to+building+OpenPBX.o...
there is the following adduser command:
adduser --no-create-home --ingroup openpbx --disabled-password --disabled-login openpbx
This does NOT seem to be the right format for Centos. So far, using man, I have come up with;
adduser -M -g openpbx
What else do I need?
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Joshua Gimer wrote:
I believe that if you do not provide the -m switch it will not create a user home dir. They will be placed in a group that is the same as their username. If you are creating a service account then you should probably give the user a null shell using -s /sbin/nologin. And if you do not specify a password the account is disabled. This give's you:
useradd -s /sbin/nologin openpbx
Ah, I had already created the group per instructions, so
useradd -g openpbx -s /sbin/nologin openpbx
worked. I hope it worked right!
That should do it!
On 3/9/07, *Robert Moskowitz* <rgm@htt-consult.com mailto:rgm@htt-consult.com> wrote:
at http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to+building+OpenPBX.org <http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to+building+OpenPBX.org> there is the following adduser command: adduser --no-create-home --ingroup openpbx --disabled-password --disabled-login openpbx This does NOT seem to be the right format for Centos. So far, using man, I have come up with; adduser -M -g openpbx What else do I need? _______________________________________________ CentOS mailing list CentOS@centos.org <mailto:CentOS@centos.org> http://lists.centos.org/mailman/listinfo/centos
-- Thx Joshua Gimer
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Mar 9, 2007, at 14:39, Robert Moskowitz wrote:
at http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to +building+OpenPBX.org
there is the following adduser command:
adduser --no-create-home --ingroup openpbx --disabled-password -- disabled-login openpbx
This does NOT seem to be the right format for Centos. So far, using man, I have come up with;
adduser -M -g openpbx
What else do I need?
I think that --disabled-password is the default if you don't specify a password, and to disable logins you can use "-s /sbin/nologin" to set the account's shell.
Alfred
Alfred von Campe wrote:
On Mar 9, 2007, at 14:39, Robert Moskowitz wrote:
at http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to+building+OpenPBX.o...
there is the following adduser command:
adduser --no-create-home --ingroup openpbx --disabled-password --disabled-login openpbx
This does NOT seem to be the right format for Centos. So far, using man, I have come up with;
adduser -M -g openpbx
What else do I need?
I think that --disabled-password is the default if you don't specify a password, and to disable logins you can use "-s /sbin/nologin" to set the account's shell.
Centos is still not happy:
[root@openpbx ~]#adduser -M -g openpbx -s /sbin/nologin 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] [-l] name adduser -D [-g group] [-b base] [-s shell] [-f inactive] [-e expire ] [root@openpbx ~]#
:(
Robert Moskowitz wrote:
Centos is still not happy:
[root@openpbx ~]#adduser -M -g openpbx -s /sbin/nologin 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] [-l] name adduser -D [-g group] [-b base] [-s shell] [-f inactive] [-e expire ] [root@openpbx ~]#
try # adduser -M -g openpbx -s /sbin/nologin foobar
Robert Moskowitz wrote:
Alfred von Campe wrote:
On Mar 9, 2007, at 14:39, Robert Moskowitz wrote:
at http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to+building+OpenPBX.o...
there is the following adduser command:
adduser --no-create-home --ingroup openpbx --disabled-password --disabled-login openpbx
This does NOT seem to be the right format for Centos. So far, using man, I have come up with;
adduser -M -g openpbx
What else do I need?
I think that --disabled-password is the default if you don't specify a password, and to disable logins you can use "-s /sbin/nologin" to set the account's shell.
Centos is still not happy:
[root@openpbx ~]#adduser -M -g openpbx -s /sbin/nologin 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] [-l] name adduser -D [-g group] [-b base] [-s shell] [-f inactive] [-e expire ] [root@openpbx ~]#
you didn't specify the user account. try...
# useradd -M -g openpbx -s /sbin/nologin openpbx
Alfred von Campe wrote:
On Mar 9, 2007, at 14:39, Robert Moskowitz wrote:
at http://wiki.openpbx.org/tiki-index.php?page=Easy+route+to +building+OpenPBX.org
there is the following adduser command:
adduser --no-create-home --ingroup openpbx --disabled-password -- disabled-login openpbx
This does NOT seem to be the right format for Centos. So far, using man, I have come up with;
adduser -M -g openpbx
What else do I need?
I think that --disabled-password is the default if you don't specify a password, and to disable logins you can use "-s /sbin/nologin" to set the account's shell.
As Robert has noticed, there si more then one implementation of the adduser (and useradd) command.
I suggest "passwd -l openpbx" so as to be more confident.
If Robert wants to su to the account, he probably wants a standard shell, not nologin. If he doesn't want to tell anyone what happened if they chance to get a login to openpbx, then /bin/true is a fine shell. nologin prints a message, true just exits.