Comments (8)
Hi @nephaste,
Let me clarify your request. You want to run your actual command with a different UID?
How about using sudo
like
gotty sudo top
from gotty.
Hi Master Yudai
no i mean to use the password authentification "-c" flag
actually i run gotty with a custom user and password qnap:qn@p
gotty -p "8586" -w -c qnap:qn@p "/bin/sh" &
i would like to use the embedded linux user "admin" (is root on Qnap)
sorry if i was not clear enough
from gotty.
So really, you want gotty to use the operating system's authentication method (pamd, etc.)...
from gotty.
The -c
option of gotty is not related to the users of your OS. You can use any username and password (including admin
) with the -c
option.
The owner of your gotty process will be the owner of the shell you are running to launch gotty. Child processes created by gotty (/bin/sh
) will be owned by the same user as well. There is no relationship between the -c
option and those PIDs.
Therefore, if you want to run gotty itself with PID0, you can just run like sudo gotty /bin/sh
(the owner of both gotty and /bin/sh will be PID0).
If you want to run only /bin/sh
with PID0, you can run like gotty sudo /bin/sh
(in this case, you may need to edit the sudors file to run sudo without a password).
Instead of /bin/sh
, it might be a better way to use just /bin/login
or ssh
to use OS's authentication system. If you want to integrate gotty with a HTTP-level authentication like PAM or something, it's out of the scope of gotty, I believe. Gotty can provide really a light way authentication (basic auth), however, if you need a stricter authentication, perhaps setting up a proxy in front of gotty like nginx and Apache is the way to go.
from gotty.
Hi Yudai,
thanks for the feedback, i will try with /bin/login didnt think about it :)
from gotty.
confirm work as expected with /bin/login ;)
from gotty.
I am thinking about using "gotty /bin/login" as a way to login to my server without a terminal. Is this in any way considered safe? I mean it is using the OS own authentication. Is it safe?
from gotty.
@cowai Maybe no body can make sure that using /bin/login
with gotty is safe. It depends on your requirements.
from gotty.
Related Issues (20)
- Connection timed out
- Connection timed out
- Gotty installed via brew doesn't support --term flag
- tweaking scrollback buffer and disconnections
- Failed to execute command HOT 2
- Installation through `go install` fails because of dependency issue HOT 4
- New line is not rendered on chrome 101 HOT 1
- HomeBrew installation requires intel architecture HOT 1
- Default port
- fatal error: runtime: bsdthread_register error HOT 5
- Gotty multi users and Docker and Helm
- Can I use ldap authentication before user login ?
- The browser terminal cannot display emoji HOT 3
- gotty_darwin_arm ?
- Error "Failed to authenticate websocket connection" from Jmeter tool
- It's great, it would be perfect if it can continue to be packaged as web nc
- brew installation error
- New needs and suggestions,and ask for help
- build xterm.ts more errors
- 📣 Maintained fork at sorenisanerd/gotty 📌
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotty.