Comments (7)
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.
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.
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.
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.
from libnss-ato.
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.
Cool solution (Pre- Post - Invoke) for apt!!!
from libnss-ato.
Related Issues (11)
- Failing on CentOS 7 Vanilla HOT 4
- Cannot create new users HOT 1
- License confusion HOT 1
- Fall back to passwd file from radius is not working. HOT 2
- passwd: Authentication token manipulation error HOT 4
- Override MIN_GID_NUMBER on Debian HOT 1
- libnss-ato considers test_user:test_group as username HOT 6
- Support for Alpine
- How to get working sudo su for user ? HOT 1
- Is there any opensource alternative of libnss-ato? HOT 4
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 libnss-ato.