# Can't login using webmin - system uses pam_unix2

## al-Quaknaa

Hi.

I'm totally lost - have read near everything here on forums and dunno what to do. I want to use webmin-1.250 on a system, which uses pam_unix2 and blowfish for passwords encryption. I had to emerge Authen-PAM which wasn't dependency, just by the way. But still it doesn't work. I paste some (i think) interesting configs.

/etc/webmin/miniserv.conf

```
port=10000

root=/usr/libexec/webmin

mimetypes=/usr/libexec/webmin/mime.types

addtype_cgi=internal/cgi

realm=Webmin Server

logfile=//var/log/webmin/miniserv.log

errorlog=//var/log/webmin/miniserv.error

pidfile=//var/run/webmin.pid

logtime=168

ppath=

ssl=1

env_WEBMIN_CONFIG=//etc/webmin

env_WEBMIN_VAR=//var/log/webmin

atboot=0

logout=//etc/webmin/logout-flag

listen=10000

denyfile=\.pl$

log=1

blockhost_failures=5

blockhost_time=60

syslog=1

session=1

userfile=//etc/webmin/miniserv.users

keyfile=//etc/webmin/miniserv.pem

passwd_file=/etc/shadow

passwd_uindex=0

passwd_pindex=1

passwd_cindex=2

passwd_mindex=4

passwd_mode=0

preroot=mscstyle3

passdelay=1
```

/etc/webmin/pam/config

```
/etc/webmin/pam/configlib_dirs=/lib/security

pam_dir=/etc/pam.d

ignore=README

mod_equiv=pam_unix_acct.so=pam_pwdb.so pam_unix_auth.so=pam_pwdb.so pam_unix_passwd.so=pam_pwdb.so pam_unix_session.so=pam_pwdb.so pam_unix_sess.so=pam_pwdb.so pam_unix.so=pam_pwdb.so

```

Yes, I've read about the /etc/webmin/miniserv.users so I hope that this is right:

```
root:x:0
```

/etc/pam.d/webmin

```
#%PAM-1.0

auth    required        pam_unix.so     nullok

account required        pam_unix.so

session required        pam_unix.so

```

This one is strange. Everywhere in /etc/pam.d* mentioned pam_unix.so I have changed it to pam_unix2 to get it working, but in this both aren't working - pam_unix2.so or pam_unix.so (as set)  :Sad: 

And the most strange thing - usermin works quite well ... really dunno the difference. I thought downgrading to webmin-1.170-r3 will help, but it wasn't possible for me, because it gave me the "missing keyword" error and no one at #gentoo helped me, sorry for my n00biness  :Wink:  (I thought that it might help because the usermin version is 1.1* but webmins is 1.2* and every thread I've found spokes about 1.1* - as I said, I wasn't able to downgrade)

Any1 could help me? Please...

al-Quaknaa

----------

## bidders

Having just installed webmin and wondered why the hell I couldn't log in, I found this thread after yours:

https://forums.gentoo.org/viewtopic-t-279117-highlight-webmin+login.html

That's when I noticed that the line in minserv.users needs to contain the encrypted password from /etc/shadow - copy/paste this and try again.

----------

## al-Quaknaa

:-/

Thats why I pasted the content of miniserv.users - I've found the same thread as you and the line I have in miniserv.users does the stuff it should (it takes encrypted password from /etc/shadow, thats what  :Mad: : thing stands for), so the problem is somewhere else (pam_unix2 system  :Sad:  )

Still thanks for interest

al-Quaknaa

----------

## nekromancer

Hey, I got webmin on a  pam_unix2 system and its working normally.

In the /etc/pam.d/webmin  file you gotta replace all the pam_unix.so  lines with  pam_unix2.so

Plus, I dunno about you but in my /etc/pam.d/webmin file it has an extra line at the top that includes the system-auth

file (that file is also inside the /etc/pam.d/  directory.

This will let you log into webmin and stuff.. but the only problem after that is getting webmin to create users using blowfish encryption, so far I still have it using MD5  :Sad:   unless you copy/paste the blowfish pre-encrypted password into the passwd box.

----------

