1

Our team is 3 people :

  • anna
  • ben
  • carl

They do web development so each site has its own user :

  • site1 is a user for website #1
  • site2 is a user for website #2

We want each user to login with their user and be able to su into the website's user so that files are created by the right "website" user.

Our twist is that every person must be able to su into websites' users but not into people's users. So anna can su to site1 but she cannot su to carl.

Users (people) must be able to su into future websites' users (e.g. site96 that does not exist yet). Note that people are pretty stable so it could be manageable to exclude instead of including.

When a website user is created, its group is the same as the user (user site1 is only member of group site1). The server is managed by Runcloud, a service that generates the user and the group (same name for both).

I've seen articles like this which I think can help... but I get nowhere :

https://linuxize.com/post/how-to-add-user-to-sudoers-in-ubuntu/

How do I allow only one user to su to another account?

Is this achievable by doing the right configuration once (and not alter it each time we create a new website) ?

Maxime
  • 111
  • 4
  • 1
    No need to use `su` and no need to make the humans admins. this seems a classic use case for [groups](https://askubuntu.com/questions/136788). Simply have the admin add each human to the `site1` *group*, `site2` *group*, etc. Many possible variations both simple and complex. – user535733 Jan 31 '20 at 19:09
  • `su` or `sudo`? – FedKad Jan 31 '20 at 19:52
  • what user @user535733 says. This is done with GROUPs. – Rinzwind Jan 31 '20 at 19:57
  • Unfortunately, I cannot control the groups. I have added a clarification about that. – Maxime Jan 31 '20 at 20:57

0 Answers0