Results 1 to 2 of 2
If I wanted multiple users to login via ssh with the same credentials but to not see file system changes made by each other, what would be the best method ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-02-2013 #1
- Join Date
- Jul 2013
Question re: multiple users logging in with same credentials
If I wanted multiple users to login via ssh with the same credentials but to not see file system changes made by each other, what would be the best method to accomplish?
For example, let's say I have system accounts level0, level1, and level2. I have 3 users that need login to each account in order to solve a puzzle before the users can go on to the next level.
Logging in is simple enough by just sharing the credentials. But how to virtualize (I don't know a better word) the file system so that if User A logged in as level0 creates a file hi.txt User B also logged in as level0 won't see that file.
That file could be created anywhere level0 has permissions.
Thoughts? I remember old school wargame/challenge servers being this way but never knew how those systems were configured.
- 07-06-2013 #2
- Join Date
- Jan 2011
I don't know if this would fit your needs, but perhaps you could utilize groups.
Let each user have their own username, but let level0 be a group the user is in. As they advance, they can get added into the level1 group, allowing them to utilize permissions set for a group.
Perhaps something like:
sudo su touch level1Puzzle.txt chown root:level1Group level1Puzzle.txt chmod 640 level1Puzzle.txt <repeat for each level> ls -l rwxr----- root level1Group level1Puzzle.txt rwxr----- root level2Group level2Puzzle.txt rwxr----- root level3Group level3Puzzle.txt
useradd -G level2Group username