Search Results

Search found 2 results on 1 pages for 'codegnome'.

Page 1/1 | 1 

  • How can I avoid hard-coding YubiKey user identities into the PAM stack?

    - by CodeGnome
    The Yubico PAM Module seems to require changes to the PAM stack for each user that will be authenticated with a YubiKey. Specifically, it seems that each user's client identity must be added to the right PAM configuration file before the user can be authenticated. While it makes sense to add authorized keys to an authentication database such as /etc/yubikey_mappings or ~/.yubico/authorized_yubikeys, it seems like a bad practice to have to edit the PAM stack itself for each individual user. I would definitely like to avoid having to hard-code user identities into the PAM stack this way. So, is it possible to avoid hard-coding the id parameter to the pam_yubico.so module itself? If not, are there any other PAM modules that can leverage YubiKey authentication without hard-coding the stack?

    Read the article

  • Why doesn't sed's automatic printing deliver the expected results?

    - by CodeGnome
    What Works This sed script works as intended: $ echo -e "2\n1\n4\n3" | sed -n 'h; n; G; p' 1 2 3 4 It takes pair of input lines at a time, and swaps the lines. So far, so good. What Doesn't Work What I don't understand is why I can't use sed's automatic printing. Since sed automatically prints the pattern space at the end of each execution cycle (except when it's suppressed), why is this not equivalent? $ echo -e "2\n1\n4\n3" | sed 'h; n; G' 2 1 2 4 3 4 What I think the code says is: The input line is copied to the hold space. The next line is read into the pattern space. The hold space is appended to the pattern space. The pattern space (line1 + newline + line2) is printed automatically because we've reached the end of the execution cycle. Obviously, I'm wrong...but I don't understand why. Can anyone explain why this second example breaks, and why print suppression is needed to yield the correct results?

    Read the article

1