Coder Social home page Coder Social logo

Comments (7)

vmspike avatar vmspike commented on June 12, 2024 1

See libnss_ato.c:

/* for security reasons */
#define MIN_UID_NUMBER   500
#define MIN_GID_NUMBER   500

So if you want to use it with root, you have to decrease that values to 0, or remove the check for MIN_*_NUMBER's as I understand.

from libnss-ato.

vmspike avatar vmspike commented on June 12, 2024 1

This issue is already referred in #11.
For APT it can be better to create file /etc/apt/apt.conf.d/00libnss-ato with the content like

DPkg::Pre-Invoke  {"/bin/ln -sf /etc/nsswitch.conf.noato /etc/nsswitch.conf";};
DPkg::Post-Invoke {"/bin/ln -sf /etc/nsswitch.conf.ato   /etc/nsswitch.conf";};

and separate files /etc/nsswitch.conf.noato and /etc/nsswitch.conf.ato, to temporary disable libnss-ato for packages installation.
If it's a way to limit libnss-ato for use with ssh only would like to know it too.

from libnss-ato.

mikomarrache avatar mikomarrache commented on June 12, 2024

I tried that but I got side effects. At least the mysql user disappeared for some reason. It looks like the plugin is used for more than just SSH/login.

from libnss-ato.

donapieppo avatar donapieppo commented on June 12, 2024

I tried to comment in libnss_ato.c the lines that check MIN and MAX uid numbers

        /*
        if ( conf->pw_uid < MIN_UID_NUMBER )
                conf->pw_uid = MIN_UID_NUMBER;

        if ( conf->pw_gid < MIN_GID_NUMBER )
                conf->pw_gid = MIN_GID_NUMBER;
        */

and the command id works:

# id pippo
uid=0(root) gid=0(root) groups=0(root)

Can you describe what doesn't work for you so I can replicate your system?

from libnss-ato.

mikomarrache avatar mikomarrache commented on June 12, 2024

from libnss-ato.

donapieppo avatar donapieppo commented on June 12, 2024

I think that every system operation like, for example, creating new users (I think that mysql package checks the existence of mysql user and, as MIN_UID_NUMBER = 0, it finds it and does not create it)
has that problem.

I suggest that you create a file like /etc/nsswitch.conf.ato (with passwd: files ato)
and /etc/nsswitch.conf.noato (with passwd: files)

Then to install packages:

cp /etc/nsswitch.conf.noato /etc/nsswitch.conf
apt-get install  mysql-server
cp /etc/nsswitch.conf.ato /etc/nsswitch.conf

from libnss-ato.

donapieppo avatar donapieppo commented on June 12, 2024

Cool solution (Pre- Post - Invoke) for apt!!!

from libnss-ato.

Related Issues (11)

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.