Giter Site home page Giter Site logo

Comments (8)

yudai avatar yudai commented on May 1, 2024

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.

nephaste avatar nephaste commented on May 1, 2024

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.

haliphax avatar haliphax commented on May 1, 2024

So really, you want gotty to use the operating system's authentication method (pamd, etc.)...

from gotty.

yudai avatar yudai commented on May 1, 2024

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.

nephaste avatar nephaste commented on May 1, 2024

Hi Yudai,

thanks for the feedback, i will try with /bin/login didnt think about it :)

from gotty.

nephaste avatar nephaste commented on May 1, 2024

confirm work as expected with /bin/login ;)

from gotty.

ariselseng avatar ariselseng commented on May 1, 2024

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.

yudai avatar yudai commented on May 1, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.