0

A sysadmin may want to add a new user that will have no root access (nor sudo).

I don't sell hosting services but I can bring this field as an example; an hosting company gives its customers the ability to SSH tunnel into their own shared-hosting partition on a system (in which they won't be operate as root or with sudo, but just as a regular user, likely with many predefined technical disabilities like the absence of some common utilities).

How to create such a user a user with no sudo and not any other way to use root?

closed as unclear what you're asking by Jeff Schaller, Christopher, schily, mosvy, slm Nov 2 '18 at 3:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • In a look. I edited the question. – JohnDoea Nov 1 '18 at 17:16
  • 4
    Disabling root ssh only prevents people who know (or can guess) the root password from logging in as root via ssh. Normal users shouldn't know the root password, making that a non-issue. New users also don't have sudo by default, which (IMHO) turns this question into "how do I create a new user?" – Jeff Schaller Nov 1 '18 at 17:19
0

The details of sudo config files may vary on different OS's but usually by default, users are not members of any sudoers group.

There is no per-user root account, there is only one root and you either are root or you are not root.

Sudo access can be changed through the sudoers file, but that doesn't sound like what you're trying to do.

  • See Difference between root and sudo.
  • See man 5 sudoers for sudo configuration options.
  • You can also prevent users from using su, use pam, but, from your question, just create a user and don't explicitly add them to the sudoers group, and make sure the root password is secure...and don't install dodgy software that runs SetUID, and you should be good.

Not the answer you're looking for? Browse other questions tagged or ask your own question.