As a security measure, we need to force all the users to use MD5 encryped passwords. For that we need to list users whose encrypted password is not MD5. I understand all MD5 encrypted passwords start with $1$ and a sample entry in /etc/shadow would be
I tried grep -v ":$1$" /etc/shadow and grep -v ":\$1\$" /etc/shadow and grep -v :\$1\$ /etc/shadow to list the entries without MD5 encryption but no luck (none of them give expected output)
Please advise the correct way to get the user list without MD5 encrypted passwords. Thank you!
Hi,
I do not want the plaintext password to appear in the netrc file. So I want to encrypt the password. Is there a way to encrypt the password and still make ftp to use the netrc ?
Thanks in advance.
-Gow:confused: (2 Replies)
I'm tasked to change a user's password on multiple Linux systems (RH v3). I though copying the encrypted password from one Linux /etc/shadow file to another would work but I was wrong.
The long term solution is to establish an openLDAP Directory service, but for now I'm stuck with a manual... (1 Reply)
Hello everyone and let me start off by thanking anyone who can help with this.
I work for a company that uses Unix as one of their servers. I'm not at all familar with Unix beyond logging after I restart the server:rolleyes: I'm looking for some command that will bring me up a list of current... (3 Replies)
Hi folks,
What will be the easy way to decrypt encrypted passwords on MySQL table. Googling brought me many suggestions on crypt/decrypt running scripts. Please advise. TIA
Remark:
I think the encrypt function of MySQL uses the Unix crypt command to encrypt
B.R.
satimis (1 Reply)
Hi
I wonder whether is possible to generate enrypted passwd for some user and paste it into /etc/shadow file ?
What kind of encryption is used in /etc/shadow file ?
ths for help. (1 Reply)
Hi,
Is it possible to convert MD5 passwords to SHA-512?
I'm about to migrate an old slackware server to Debian, then I noticed that they don't use same encryption method.
I'm aware that I can change the encryption method in Debian to MD5, but as far as I understand SHA-512 is more secure,... (2 Replies)
i have an application that uses the encrypted password that's in the /etc/shadow file.
i copied the line for the particular username i was interested it in from shadow file and i pasted it into the password file of the application. the application is nagios.
this application allowed that... (5 Replies)
How to keep encrypted password in a shell script.?
I have the file which has the following:
a.sh
-----
username=abc
password=abc
I will be using this username and password in another script. But I don't want to reveal the password in the script. How to keep the password... (3 Replies)
Hello, on my android device my app autosaves my password and it encrypts by TLS
im not politically exposed person, just regular entrepreneur. Should i worry if i loose my phone with TLS encrypted password? Or regular mortals or casual hackers are not able to crack it? (4 Replies)
Discussion started by: postcd
4 Replies
LEARN ABOUT DEBIAN
userdbpw
USERDBPW(8) Double Precision, Inc. USERDBPW(8)NAME
userdbpw - create an encrypted password
SYNOPSIS
userdbpw [[-md5] | [-hmac-md5] | [-hmac-sha1]] |userdb {name} set {field}
DESCRIPTION
userdbpw enables secure entry of encrypted passwords into /etc/courier/userdb.
userdbpw reads a single line of text on standard input, encrypts it, and prints the encrypted result to standard output.
If standard input is attached to a terminal device, userdbpw explicitly issues a "Password: " prompt on standard error, and turns off echo
while the password is entered.
The -md5 option is available on systems that use MD5-hashed passwords (such as systems that use the current version of the PAM library for
authenticating, with MD5 passwords enabled). This option creates an MD5 password hash, instead of using the traditional crypt() function.
-hmac-md5 and -hmac-sha1 options are available only if the userdb library is installed by an application that uses a challenge/response
authentication mechanism. -hmac-md5 creates an intermediate HMAC context using the MD5 hash function. -hmac-sha1 uses the SHA1 hash
function instead. Whether either HMAC function is actually available depends on the actual application that installs the userdb library.
Note that even though the result of HMAC hashing looks like an encrypted password, it's really not. HMAC-based challenge/response
authentication mechanisms require the cleartext password to be available as cleartext. Computing an intermediate HMAC context does scramble
the cleartext password, however if its compromised, it WILL be possible for an attacker to succesfully authenticate. Therefore,
applications that use challenge/response authentication will store intermediate HMAC contexts in the "pw" fields in the userdb database,
which will be compiled into the userdbshadow.dat database, which has group and world permissions turned off. The userdb library also
requires that the cleartext userdb source for the userdb.dat and userdbshadow.dat databases is also stored with the group and world
permissions turned off.
userdbpw is usually used together in a pipe with userdb, which reads from standard input. For example:
userdbpw -md5 | userdb users/john set systempw
or:
userdbpw -hmac-md5 | userdb users/john set hmac-md5pw
These commands set the systempw field in the record for the user john in /etc/courier/userdb/users file, and the hmac-md5pw field. Don't
forget to run makeuserdb for the change to take effect.
The following command does the same thing:
userdb users/john set systempw=SECRETPASSWORD
However, this command passes the secret password as an argument to the userdb command, which can be viewed by anyone who happens to run
ps(1) at the same time. Using userdbpw allows the secret password to be specified in a way that cannot be easily viewed by ps(1).
SEE ALSO userdb(8)[1], makeuserdb(8)[2]
NOTES
1. userdb(8)
userdb.html
2. makeuserdb(8)
makeuserdb.html
Double Precision, Inc. 08/23/2008 USERDBPW(8)