Hot answers tagged

7

Short Answer I was experiencing this issue and the problem was that there was a policy in /etc/ssh/sshd_config that was being violated. Mine was that AllowUsers was set and I was trying to log in as a user that did not already exist on the system. Longer Answer The longer answer is that the password was being overwritten. It was not actually coming in as ...


6

The hash is stored in base64 format which means one charcter encodes 6 bits. So 512 / 6 = 86 (rounded up) characters are needed. The hash starts after the third (not 2nd) $ and ends before next colon which is exactly 86 characters. The string YwkRWeVN between 2nd and 3rd $ is called salt.


4

After a cursory look at the source code in /usr/sbin/authconfig and /usr/share/authconfig/authinfo.py: The man page is incomplete, the complete list of options accepted by the script is in authconfig --help Everything can be overridden on the command-line (even /etc/security/pwquality.conf settings like password minimum length), except pwquality itself. ...


4

passwd -n 9999 user will prevent user from changing his password for almost 274 years. If you want to have passwordless user, which is unable to change his password, open /etc/shadow as root, find the line which begins with the name of the user, and change the content between first and second colon to U6aMy0wojraho. (source: https://help.ubuntu.com/...


4

Read the manual http://linux.die.net/man/5/pwquality.conf . Minimum length cannot be set to a value lower than 6. And if credits are enabled—which is the default—the computed score can be higher than you compute yourself.


4

What PAM service name does useradd use? It doesn't use PAM to look up the system authentication service at all. The only thing it uses PAM for is to authenticate the user who's calling useradd (not the user account being created). And that only happens if it was compiled to use setuid and PAM. what about adding a user PAM doesn't address user or group ...


4

Differentiating between required and requisite gives additional flexibility in PAM configuration. As you note, once the authentication is known to fail, in many cases there is no point in continuing further. As an example, suppose we are maintaining a log of all attempts to access the resource in question. In this case, it could be useful to include ...


4

Most GUI prompts on a modern Ubuntu release are for authenticating to Polkit: the Software update/install prompts, changing settings in Disks or User Accounts, etc. Additionally, on the command line, using systemctl (and systemctl-based commands like shutdown, reboot, etc.) also authenticate via Polkit (if you don't use sudo). For all of these, the ...


3

Instead of importing the system's authentication mechanisms, configure pam_userdb or write a simple custom PAM module yourself. Load it as the only module in the stack: auth requisite pam_userdb.so db=/etc/security/myapp.passwd.db @include common-account


3

http://linuxers.org/howto/how-force-users-change-their-password-upon-first-login "How to force every new user to change password at first login For this change we need to change the default setting of useradd command. [root]# vim /etc/default/useradd Look for the line or just append the following line in the file. Expire=0" Or http:...


3

"It depends". You have multiple options, which one makes sense dependends on where in the stack they are, and what effect you want. Since you only post the snippet, and not your entire config, I can think of two off the top of my head: You can mark them both "sufficient". That tag means that a match will stop evaluation (later lines will not be processed at ...


3

You just need to run sudo -k to invalidate the current user's cache. More info in man sudo. Hope that helps!


3

I figured it out! I had to comment out # Standard Un*x authentication. # @include common-auth in /etc/pam.d/sshd to disable Un*x password auth. Now it's successfully authenticating only using the publickey and the yubikey response.


2

Try disabling PAM at the configuration step: ./configure --disable-plugin-auth-pam


2

Nothing wrong, this is the expected behaviour. As root, you bypass authentication. Not everyone has root access, hopefully...


2

My system is allowing me to authenticate with only 8, why? max=N (max=40) The maximum allowed password length. This can be used to prevent users from setting passwords that may be too long for some system services. The value 8 is treated specially: if max is set to 8, passwords longer than 8 characters will not be rejected, but will be ...


2

You can take manual control over your system-auth file. Create a new file (you could start by copying system-auth-ac), and change the system-auth symlink to point at the new file. This makes it your responsibility to update this part of your PAM configuration, as authconfig will no longer touch the symlink or the file it points to. However, authconfig ...


2

Troubleshooting Authentication, Password Change and Access Control In order for authentication to be successful, the user information must be accurately provided first. Before debugging authentication, please make sure the user information is resolvable with getent passwd $user or id $user. Failing to retrieve the user info would also manifest in the secure ...


2

PAM does not mix auth and account type, but rather stacks them independently according to the management type. The return value of a stack depends on the order of the options and the control flags, cf. https://docs.oracle.com/cd/E19253-01/816-4557/pam-15/index.html What is done with the result, depends a bit on the application. Typically a program like ...


2

Thanks to Linux systems, this was exceptionally easy. Just fire up any linux distro, in my case a Kali VM. Pop the SD card into a USB reader and plug it in. The 2 Rasbian SD partitions: boot and rootfs are automatically recognized. Then cd into /media/<blahblah>/rootfs/etc/pam.d/ and sudo edit the file. Unmount and put it back in your Pi. And if this ...


2

I think you're mixing up authentication and authorization. As you can see from the logs, the authentication phase succeeds (meaning that the credentials were successfully verified)... Jul 19 14:30:39 virtualBox gdm-password]: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice ...but the ...


2

My first question is, why is SSSD doing multiple LDAP binds on a single machine? If you only use LDAP as an ID provider (directory service with information such as UIDs/GIDs/groups), that only needs one connection, bound using the server's "machine credentials" (or anonymous). But if you also use LDAP as an authentication provider, then every ...


1

Is SELinux on? What are the respective labels on these files? ls -lZ /home/ldapuser /home/ldapuser/.ssh /home/ldapuser/.ssh/authorized_keys Running restorecon -rf /home/ldapuser/ should fix the problems.


1

I had the same issue and solved just login directly with the user (in my case, using Putty). Before the first login, tried changing access.conf and didn't work. Just after add a password to the user and changed you shell to bash that solved my PAM configuration error, so I can finnally return the user to a non-shell and with su userInTrouble from root user ...


1

Another common mistake/misconception is how to get the password from pam which is passed on stdin. The easiest way I have seen is PASS=`cat -` . The more common method of reading from arguments such as $@, $1, etc DOES NOT WORK.


1

The answer is: man pam_umask usergroups If the user is not root, and the user ID is equal to the group ID, and the username is the same as primary group name, the umask group bits are set to be the same as owner bits (examples: 022 -> 002, 077 -> 007). Man ...


1

Is your SSH server configured for kerberos? E.g. KerberosAuthentication yes KerberosTicketCleanup yes GSSAPIAuthentication yes GSSAPICleanupCredentials yes UseDNS yes From what I see above, SSH it is attempting to login with credentials rather than by presenting a kerberos ticket (that you can get by using kinit on the client side). Sure, as you pointed ...


1

I have encountered the same problem on Centos 6.2. It works after I comment out include in pam file as follow. I use ArchLinux Wiki as a reference. auth required pam_unix.so auth required pam_env.so auth required pam_google_authenticator.so #auth required pam_sepermit.so #auth include password-auth ...


1

Okey dokey. I see. It is not PAM configuration or anything like that. The code that uses PAM to login user is not setting PAM_RHOST. PAM, in order to know the remote host, needs to call pam_set_item(pamh, PAM_RHOST, remote_hostname) ; So the problem is external. I am leaving this question for anyone working on PAM and facing the same issue.


1

auth sufficient pam_rootok.so auth sufficient pam_succeed_if.so use_uid user = privileged auth requisite pam_succeed_if.so uid > 0 auth requisite pam_unix.so You could do this with sudo in an easier way: privileged ALL=(ALL:ALL) ALL public ALL=(privileged) ALL


Only top voted, non community-wiki answers of a minimum length are eligible