-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple users and 1-to-1 mapping ? #143
Comments
Not right now, but pty.js has the ability to set the uid and gid of the forked process. So, it is technically possible to map each browser user to a unix user if implemented right. I think this is a good idea and shouldn't be too difficult to implement. Will accept PRs. That being said, you could also set the default shell to a unix login. That way users would just login using the terminal. I haven't tested it myself, but I've heard of people doing it. |
Thank you. I was also thinking of the unix login shell approach. |
chjj I would like to know how to setup tty.js or the inside implementation of pty for the default unix login. I'm currently running tty.js project because of the express server. |
FWIW, I had trouble getting tty.js to use the default unix login, so set my shell parameter to be a tiny script that I call 'ssh-localhost' which looks like this:
This allows me to use tty.js to login as any user on the local host where tty.js is running. |
Is it possible for a single tty.js server to support multiple users with each user mapped to a unique linux user ? Currently it seems all the users access the same linux user's shell.
I have userZ running the tty.js server and two users userA, userB specified in config.json. But both userA and userB end up having the access to userZ's shell [whoami returns userZ for both userA and userB]. How can I map userA to linux userA's shell and userB to linux userB's shell ?
One solution I can think of is to specify a custom shell in config.json "shell" : "my_shell_script" that logins into the appropriate user shell.
Thank you
The text was updated successfully, but these errors were encountered: