Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am using MDK 9.1 and I would like to know how could I tell if my login and my root passwords are encrypted or not? Where could I go and see and how could I tell?
And also, how could I use cryptography like in OpenBSD?
Originally posted by wardialer I am using MDK 9.1 and I would like to know how could I tell if my login and my root passwords are encrypted or not? Where could I go and see and how could I tell?
See the * (asterisk) in the second column? That means the hashed password is in shadow.
Passwords really aren't encrypted, they're hashed. This means (roughly) that a pattern of the password is generated, but that there's no possible way to convert that pattern back to the original password; however, if you later run the same pattern algorithm on a password that the user types in, you can compare that pattern to the password pattern and see if they match.
None of that covers whether your password is protected when you're trying to authenticate, though. Depending on how you're logging in (Telnet, SSH, to get e-mail with POP3, etc) your password may or may not be protected. In that case it doesn't matter at all if your password on the disk is hashed and placed in /etc/shadow, if you use an insecure login protocol, then your password is exposed.
And as a small note, most Linux distributions use MD5 hashing for the password. Some security researchers have recently found flaws in MD5 that allows for some collisions to be generated. While this does not mean that you could use a hash to generate the correct password, there are now quicker ways to match the password by brute-force.
On the other hand, most of the BSD family use Blowfish to hash their passwords and there haven't been any weaknesses yet found with Blowfish.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Really the only thing to make it more secure is to use passwords at least 8 characters long. With methods other than Crypt() (DES) passwords longer than 8 characters actually get stronger (DES only hashed up to 8 characters, so anything beyond that was pointless). You could also switch from MD5 to Blowfish for your password hashing, but that would require resetting the password for everyone since there's no way to convert it.
You could also switch from MD5 to Blowfish for your password hashing, but that would require resetting the password for everyone since there's no way to convert it.
How would I do that?
Quote:
"Resetting the password for everyone"
Well, I am the only one who uses the computer. Thats it. And plus its a standalone with no webserver services running either. So how would I convert this passwd file to use Blowfish (BSD-like)??? But the bottom line is, the passwd file that was given above, is that encrypted??
I want to covert this to Blowfish. How?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
First, passwords are not encrypted, they're hashed. It's different because hashing is not reversable while encryption is (with the key). Second, you don't encrypt the password files, you store hashed passwords in them. Third, you don't want the password hashes in /etc/password because that allows them to be brute-forced off-line! Hashed passwords go in /etc/shadow (or /etc/master.passwd, depending on the OS). Fourth, I'm not aware of any Linux distros that allow you to use Blowfish as the native password hashing scheme, so you would have to find a PAM plug-in for that.
I stumbled onto this online Plain text password to Blowfish encryption conversion. I think I will do that is to convert my existing login password to Blowfish using that online thing.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
It doesn't do any good to convert your passwords to Blowfish hashing if your login mechanism doesn't support it (which Linux does not do, native). Also, I would strongly recommend against using someone's on-line tool to hash passwords. Think about it, they could easily keep a log of every plain text password and what IP made the connection to their site. It would be a simple matter to scan each IP for remote login services and try each password that was entered in the conversion site.
Greetings
RH (9 at least) and SuSE 9 and up support Blowfish for encryption. Not by default, but it's still supported. I don't have definitive knowledge on any other distros so I don't want to comment on what I'm not sure of.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.