0

We have an Ubuntu PC that has one user, dev, which multiple people ssh into simultaneously. How can each user that's sshed into dev use their own .conf files?

There are numerous scripts that only work for dev, so it's not practical for us to have separate users for every person.

We could run something like su - dev -c "./script" from our own accounts, but I'm wondering if there's a better way.

1
  • The question is actually how could the ssh server tell those users apart if they are all logging into the same user? There has to be a bit of information you can rely on in order to make the difference, otherwise ... it's tricky, you'd have to use their client configurations and trust them to identify correctly. Apr 11, 2023 at 6:02

2 Answers 2

1

You're trying to reinvent user accounts. Don't do that but instead use the tools you've already got.

There are numerous scripts that only work for dev, so it's not practical for us to have separate users for every person.

Fixing these would be the better investment of time. This way you'll have a standard maintainable system running custom development tools. Changing your Linux-based system to handle multiple "user accounts" under the single dev login may require additional effort each time you upgrade and regardless will result in a non-standard system that needs special care to administer

1
  • I whole-heartedly +1 this answer. The OP may also benefit by relying on having all dev's in a common group instead of all in a single user account.
    – Jim L.
    Apr 11, 2023 at 19:50
0

After a user logs onto their own account, they can run su - dev to continue their session as dev, and their individual .conf files will still be used.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .