Does the pam_pwdfile module support clear text passwords?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Does the pam_pwdfile module support clear text passwords?
# 1  
Old 11-26-2013
Does the pam_pwdfile module support clear text passwords?

I need to utilize pam_pwdfile in order to authenticate virtual users in vsftpd. I know I can utilize htpasswd2 -m to create a password file however it is vital since I am administrating several machines in our organization that the password generated be in clear text. Does anyone on here know if that is possible using the pam_pwdfile module for authentication?
Best Regards,
Cole
# 2  
Old 11-26-2013
Why is it vital that the passwords be in clear text? There's very good reasons passwords traditionally haven't even been stored in any retrievable fashion, let alone plaintext.
# 3  
Old 11-26-2013
I utilize puppet to deploy my servers. In this instance I am unable to create users on each machine since our infrastructure is tied to ldap. Each server is unable to be accessed from the shell level by everyone outside of our infrastructure team. We would be the only ones who have access to the password files.

That being said. Using puppet to deploy ftp accounts utilizing vsftp virtual users requires the use of pam_pwdfile module for authentication from what I have read, unfortunately however the password hashes are different on every machine. I have tried to do a sort of hack using: echo -e "$username:`perl -le 'print crypt("$password","salt")'`" >> files/passwd within a adduser script, that does not have a salt that changes... simply called 'salt', and while I can create a hash that doesnt change on a single machine. That hash changes on every other machine. Hence the reason why I would prefer to simply use plain text for the vsftpd user accounts.

Best Regards,
Cole
# 4  
Old 11-26-2013
Try
Code:
# htpasswd -m files/passwd $username

# 5  
Old 11-27-2013
That was actually the first thing I tried. I noticed that htpasswd creates a random salt for the hash. Because every time the password is generated the hash is completely different. Thats why I attempted to create a static salt using perl's cryptography function... and that worked however only for that single machine. When that same algorithm is run on a different machine it produces a different hash.

This is why the next step is to find out wither or not there is a way to simply have the passwords in clear text specifically for vsftpd's virtual users. These are FTP servers and the users of these boxes are essentially jailed to their folders anyways, so the ability for them to access each others passwords is irrelevant. I do need the ability to deploy more than one FTP server with the same user group since it is essential that FTP access is available 100% of the time, in case one of the 2 servers goes down.
# 6  
Old 11-27-2013
Quote:
Originally Posted by colbyshores
That being said. Using puppet to deploy ftp accounts utilizing vsftp virtual users requires the use of pam_pwdfile module for authentication from what I have read, unfortunately however the password hashes are different on every machine.
Yes. This is how hashes work. A random number is thrown in to make brute-forcing them far more difficult.

If the two machines use the same encryption algorithms, the salts don't matter. The computer has to 'crack' the salts anyway, it's just there to make brute-forcing them back into valid passwords exponentially more difficult.
# 7  
Old 11-27-2013
Quote:
Originally Posted by colbyshores
This is why the next step is to find out wither or not there is a way to simply have the passwords in clear text specifically for vsftpd's virtual users.
Short answer - no

Longer answer - you could modify the vsftp sources to do what you want.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

When did UNIX start using encrypted passwords, and not displaying passwords when you type them in?

I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies

2. AIX

Convert clear text into binary

Hi I need to display the binary text of an clearn text which is sent as input to the shell script (c shell); ex: I will pass "HELLO" as input, and i should get the binary format of the text Thanks in advance Mohan (1 Reply)
Discussion started by: mKarri
1 Replies

3. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

4. Shell Programming and Scripting

usage of module Text::Wrap;

hi, i want to use module Text::Wrap. this module provides the option $Text::Wrap::tabstop to change the tabstop from 8 blanks to any nummer. i want to set it to 30 blanks. but when i change the nummer of blanks nothing happens. Text::Wrap::tabstop = 30; $wtd = wrap("","\t",$1); or do i... (3 Replies)
Discussion started by: trek
3 Replies

5. Solaris

Apache on Solaris10 configured with loadable module support?

I have Apache 2 webserver as delivered with the Solaris 10 installation. How to verify if Apache is configured with loadable module support? Or if needs to be recompiled with loadable module support. (2 Replies)
Discussion started by: kavera
2 Replies

6. Programming

Module Support! How does it work?

ey everyone, I have been working on an application for a while, and would like others to be able to add modules for it. The problem is, I don't know how to implement them. I am using the dlopen() library set. I understand how to load modules into t he program and how to execute the code.... (5 Replies)
Discussion started by: farhan00
5 Replies
Login or Register to Ask a Question