Giter VIP home page Giter VIP logo

Comments (5)

infinisil avatar infinisil commented on September 3, 2024 3

It's possible to use useradd with a shadow without PAM support:

nix-shell -p '(import <nixpkgs> {}).shadow.override { pam = null; }' --run 'useradd alice'

from nix-docker.

sokoow avatar sokoow commented on September 3, 2024

also, I figured it might be pam missing, but when I try to add it:

installing 'linux-pam-1.3.0'
building '/nix/store/0g074r0x1wf4drq2h5jalassmjsbrmbc-user-environment.drv'...
error: getting status of '/nix/store/jh75rrglhvdjpm793zkc8jkzcpwwhajm-linux-pam-1.3.0/bin/unix_chkpwd': No such file or directory
builder for '/nix/store/0g074r0x1wf4drq2h5jalassmjsbrmbc-user-environment.drv' failed with exit code 1
error: build of '/nix/store/0g074r0x1wf4drq2h5jalassmjsbrmbc-user-environment.drv' failed

where do I report that ?

from nix-docker.

LnL7 avatar LnL7 commented on September 3, 2024

Yeah, pam isn't configured an probably won't work if just installed.

Not sure about the build failure but the store path for the latest container should be /nix/store/jh75rrglhvdjpm793zkc8jkzcpwwhajm-linux-pam-1.3.0.

from nix-docker.

bzizou avatar bzizou commented on September 3, 2024

I'm facing the same issue. I need a NIX container running postgres, but for that, I need to create a "postgres" user, and then I need PAM, but:

bash-4.4# nix-env -iA nixpkgs.linux-pam
installing 'linux-pam-1.3.0'
these paths will be fetched (0.16 MiB download, 0.25 MiB unpacked):
  /nix/store/44aad44xx9c4kikbz8v2y9kp5hpcrb0z-linux-pam-1.3.0-man
  /nix/store/jkn0c7q20pndv4cfl4bqkx72h18vzrx5-linux-pam-1.3.0-doc
copying path '/nix/store/jkn0c7q20pndv4cfl4bqkx72h18vzrx5-linux-pam-1.3.0-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/44aad44xx9c4kikbz8v2y9kp5hpcrb0z-linux-pam-1.3.0-man' from 'https://cache.nixos.org'...
building '/nix/store/71a8xs9fdshh2p2k2nxxiwwr2vx6njxr-user-environment.drv'...
error: getting status of '/nix/store/m5q6xw9nvx6kmqzzxi6z87lxg5xlw6zs-linux-pam-1.3.0/bin/unix_chkpwd': No such file or directory
builder for '/nix/store/71a8xs9fdshh2p2k2nxxiwwr2vx6njxr-user-environment.drv' failed with exit code 1
error: build of '/nix/store/71a8xs9fdshh2p2k2nxxiwwr2vx6njxr-user-environment.drv' failed

@sokoow did you finaly manage to use PAM inside a NIX container?

from nix-docker.

zimbatm avatar zimbatm commented on September 3, 2024

this is probably solved by running the shadowSetup script from pkgs.dockerTools.shadowSetup:

https://github.com/NixOS/nixpkgs/blob/e237d884326048b139b16268aa14a3c62e125529/pkgs/build-support/docker/default.nix#L129-L151

from nix-docker.

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.