How to create an administrator user

I am building a Minecraft server on a micro computer running FriendlyWrt (a fork of OpenWrt). For security reasons, I want to create a user with administrator privileges so I can operate the server with Docker commands without using the root account.

My question is; How do I create/assign a user with these privileges? For all I know, such a thing is either not possible, or is not the solution I am looking for. In case it helps, this is what I entered and got with a user created with the default useradd command
`

minecraft@FriendlyWrt:/$ docker run -d -it -p 25565:25565 -e EULA=TRUE -v /home/minecraft/minecraft-data:/data -e TYPE=PURPUR --name mc --user ▮▮▮▮:▮▮▮▮ itzg/minecraft-server

docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create?name=mc": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

Thank you for your time, this is my first post.

In this scenario, what are the differences you're expecting between "a user with administrator privileges" and "the root account"?

2 Likes

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

2 Likes

Have you taken a look at the Friendlywrt forum? The last post was in 2017 and the create post button is broken.

  • No, I use an official version of OpenWrt (as this is the OpenWrt forum), so there's no need to.
  • An option (as others have already noted) - is to install official OpenWrt, then we'd be better able to assist with your inquiry.
  • Other options were noted as well.
  • There's also a tech support email here: http://www.friendlyarm.net/contact
1 Like