Split useradd instructions for Ubuntu/CentOS #3916

Closed
opened 2025-12-29 18:32:04 +01:00 by adam · 3 comments
Owner

Originally created by @wopfel on GitHub (Jul 29, 2020).

Originally assigned to: @jeremystretch on GitHub.

Change Type

[x] Addition
[x] Correction
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

Area

[x] Installation instructions
[ ] Configuration parameters
[ ] Functionality/features
[ ] REST API
[ ] Administration/development
[ ] Other

Proposed Changes

Proposal: Modify the Create the NetBox User section in the documentation to reflect Ubuntu and CentOS commands likewise.

Explanation: I'm trying to install NetBox right now on a Ubuntu server. Thanks to the very good documentation, everything's very easy. I'm doing copy&paste most of the time. I reached the point where the user account is created (3-netbox.md) and got some errors (see below). All other sections are separated by Ubuntu and CentOS, but the "creating the user and group" section isn't.

I think it's not a big deal, since most system administrators should know how to create groups and users on their system. But what about handling it likewise and show the different commands for Ubuntu and CentOS in the documentation file?

If I just copy and paste the instructions on Ubuntu 20.04, I get the following errors:

netbox# groupadd --system netbox
netbox# adduser --system --gid netbox netbox
Value "netbox" invalid for option gid (number expected)
...
netbox# adduser --system --group netbox netbox
adduser: Specify only one name in this mode.

The correct syntax on Ubuntu is --ingroup:

netbox# adduser --system --ingroup netbox netbox
Adding system user `netbox' (UID 113) ...
Adding new user `netbox' (UID 113) with group `netbox' ...
Creating home directory `/home/netbox' ...

I thought about opening a PR, but I saw that the mentioned part of the document was already covered and changed by #4618 lately.

Would you accept a PR where I split the instructions, putting the current commands into a CentOS section and my commands into a (new) Ubuntu section?

I'm totally fine if we leave it just as it is right now. I just observed the command mismatch and thought about sharing that with you :)

Kind regards,
Bernd

Originally created by @wopfel on GitHub (Jul 29, 2020). Originally assigned to: @jeremystretch on GitHub. ### Change Type [x] Addition [x] Correction [ ] Deprecation [ ] Cleanup (formatting, typos, etc.) ### Area [x] Installation instructions [ ] Configuration parameters [ ] Functionality/features [ ] REST API [ ] Administration/development [ ] Other <!-- Describe the proposed change(s). --> ### Proposed Changes Proposal: Modify the *Create the NetBox User* section in the documentation to reflect Ubuntu and CentOS commands likewise. Explanation: I'm trying to install NetBox right now on a Ubuntu server. Thanks to the very good documentation, everything's very easy. I'm doing copy&paste most of the time. I reached the point where the user account is created (3-netbox.md) and got some errors (see below). All other sections are separated by Ubuntu and CentOS, but the "creating the user and group" section isn't. I think it's not a big deal, since most system administrators should know how to create groups and users on their system. But what about handling it likewise and show the different commands for Ubuntu and CentOS in the documentation file? If I just copy and paste the instructions on Ubuntu 20.04, I get the following errors: ``` netbox# groupadd --system netbox netbox# adduser --system --gid netbox netbox Value "netbox" invalid for option gid (number expected) ... netbox# adduser --system --group netbox netbox adduser: Specify only one name in this mode. ``` The correct syntax on Ubuntu is `--ingroup`: ``` netbox# adduser --system --ingroup netbox netbox Adding system user `netbox' (UID 113) ... Adding new user `netbox' (UID 113) with group `netbox' ... Creating home directory `/home/netbox' ... ``` I thought about opening a PR, but I saw that the mentioned part of the document was already covered and changed by #4618 lately. Would you accept a PR where I split the instructions, putting the current commands into a CentOS section and my commands into a (new) Ubuntu section? I'm totally fine if we leave it just as it is right now. I just observed the command mismatch and thought about sharing that with you :) Kind regards, Bernd
adam added the status: acceptedtype: documentation labels 2025-12-29 18:32:04 +01:00
adam closed this issue 2025-12-29 18:32:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 29, 2020):

As luck would have it, this was just recently updated in the draft v2.9 installation docs (which will replace the current docs):

Ubuntu

# adduser --system --group netbox
# chown --recursive netbox /opt/netbox/netbox/media/

CentOS

# groupadd --system netbox
# adduser --system -g netbox netbox
# chown --recursive netbox /opt/netbox/netbox/media/

Seemed to be the right set of commands for each when I tested. Can you confirm?

@jeremystretch commented on GitHub (Jul 29, 2020): As luck would have it, this was just recently updated in the draft v2.9 installation docs (which will replace the current docs): #### Ubuntu ``` # adduser --system --group netbox # chown --recursive netbox /opt/netbox/netbox/media/ ``` #### CentOS ``` # groupadd --system netbox # adduser --system -g netbox netbox # chown --recursive netbox /opt/netbox/netbox/media/ ``` Seemed to be the right set of commands for each when I tested. Can you confirm?
Author
Owner

@wopfel commented on GitHub (Jul 29, 2020):

Hi Jeremy, thanks for your comment.

Just tried it on my Ubuntu server to check it and it looks very good to me :)

# adduser --system --group netbox
Adding system user `netbox' (UID 101) ...
Adding new group `netbox' (GID 101) ...
Adding new user `netbox' (UID 101) with group `netbox' ...
Creating home directory `/home/netbox' ...

Verified on CentOS, too (although the commands are not so chatty):

# groupadd --system netbox
# adduser --system -g netbox netbox
# id netbox
uid=998(netbox) gid=996(netbox) groups=996(netbox)

So I think it's fine just to wait until v2.9 is merged and close this issue now, isn't it?

Kind regards,
Bernd

@wopfel commented on GitHub (Jul 29, 2020): Hi Jeremy, thanks for your comment. Just tried it on my Ubuntu server to check it and it looks very good to me :) ``` # adduser --system --group netbox Adding system user `netbox' (UID 101) ... Adding new group `netbox' (GID 101) ... Adding new user `netbox' (UID 101) with group `netbox' ... Creating home directory `/home/netbox' ... ``` Verified on CentOS, too (although the commands are not so chatty): ``` # groupadd --system netbox # adduser --system -g netbox netbox # id netbox uid=998(netbox) gid=996(netbox) groups=996(netbox) ``` So I think it's fine just to wait until v2.9 is merged and close this issue now, isn't it? Kind regards, Bernd
Author
Owner

@jeremystretch commented on GitHub (Jul 30, 2020):

Might as well copy the change into develop now.

@jeremystretch commented on GitHub (Jul 30, 2020): Might as well copy the change into `develop` now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3916