GithubHelp home page GithubHelp logo

openwall / tcb Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 3.0 142 KB

Alternative password shadowing scheme

Home Page: https://www.openwall.com/tcb/

License: Other

Makefile 4.55% C 78.82% Roff 14.44% Shell 2.19%
password shadow shadowing tcb security

tcb's Introduction

The tcb package contains core components of our tcb suite implementing the
alternative password shadowing scheme on Openwall GNU/*/Linux (Owl).  It is
being made available separately from Owl primarily for use by other
distributions.  For more information please refer to:

https://www.openwall.com/tcb/

To compile and use this you either need recent libxcrypt (which adopted the
password hashing API we had introduced in Owl) or our crypt_blowfish patched
into glibc (which is how we had introduced that API originally).

libxcrypt is available at:

https://github.com/besser82/libxcrypt

crypt_blowfish is available at:

https://www.openwall.com/crypt/

tcb's People

Contributors

besser82 avatar ldv-alt avatar solardiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

besser82 ldv-alt

tcb's Issues

Thread-safety

Make -DENABLE_SETFSUGID the default and only implementation, and use the setgroups() direct syscall, so that we don't affect other threads' effective credentials.

As discussed in #14 (comment) @ldv-alt sees "no potential benefits in keeping the non-ENABLE_SETFSUGID variant, and it definitely makes sense to use the setgroups() syscall instead of the glibc function."

Authentication error after activate pam_tcb

Steps taken:

  1. Build shadow 4.13 with the parameters --with-tcb --with-bcrypt --with-yescrypt.
  2. Replaced pam_unix.so with pam_tcb.so in /etc/pam.d/* files:
# Account management.
account required /nix/store/mc3j8gfm9jafs2ywy9xq96whg10fmn3k-tcb-1.2/lib/security/pam_tcb.so shadow fork helper=/run/wrappers/bin/tcb_chkpwd

# Authentication management.
auth sufficient /nix/store/mc3j8gfm9jafs2ywy9xq96whg10fmn3k-tcb-1.2/lib/security/pam_tcb.so nullok shadow fork helper=/run/wrappers/bin/tcb_chkpwd
auth required pam_deny.so

# Password management.
password sufficient /nix/store/mc3j8gfm9jafs2ywy9xq96whg10fmn3k-tcb-1.2/lib/security/pam_tcb.so use_authtok shadow fork nullok write_to=tcb helper=/run/wrappers/bin/tcb_chkpwd

# Session management.
session required pam_env.so conffile=/etc/pam/environment readenv=0
session required /nix/store/mc3j8gfm9jafs2ywy9xq96whg10fmn3k-tcb-1.2/lib/security/pam_tcb.so helper=/run/wrappers/bin/tcb_chkpwd
  1. Changed permissions for passwd and tcb_chkpwd:
-r-x--s--x 1 root shadow 17K Dec  4 21:59 /run/wrappers/bin/passwd
-r-x--s--x 1 root shadow 17K Dec  4 21:59 /run/wrappers/bin/tcb_chkpwd
  1. Changed file /etc/nsswitch.conf:
shadow:    tcb
  1. Added lines in /etc/login.defs:
USE_TCB yes
TCB_AUTH_GROUP yes
  1. Added group auth
  2. Running tcb_convert

After all changes, when I try to log in I get an error:

login[3552]: pam_tcb(login:auth): Credentials for user root unknown
login[3033]: pam_tcb(login:auth): Authentication failed for UNKNOWN USER from (uid=0)

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.