Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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.


  2. #2
    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
    Then to advance a user:
    useradd -G level2Group username
    This is just the first thing that came to mind.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts