You are not logged in.

#1 2015-01-20 16:54:13

15goudreau
Member
Registered: 2014-06-19
Posts: 86

[ANSWERED] Is it safe to keep this password in plain text?

Hi Guys,

I'm looking into configuring a free dns service (freedns.afraid.org to be specific) and in it's .conf file to check what the IP is, it needs my account and password information owned by root. The examples is as follows

sudo nano /etc/inadyn.conf

--username techhome
--password mypassword
--update_period 3600
--forced_update_period 14400
--alias techhome.homenet.org,alphanumeric key
--background
--dyndns_system default@freedns.afraid.org
--syslog

I've been looking into salting and hashing passwords but I can't find a good guide on how to store "mypassword" in plain text as opposed to a hash+salt. I'm wondering if this really is even an issue as the file is owned by root and so anyone who tries to access it shouldn't be able to do anything with it anyways correct? Thanks for reading!

Last edited by 15goudreau (2015-01-20 21:51:17)

Offline

#2 2015-01-20 17:01:12

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [ANSWERED] Is it safe to keep this password in plain text?

Most likely no one will ever get your password. If someone does get your password, what is the worst damage they can do? Point your domain name to a different web server?

I personally don't think that's big enough damage to worry about it. smile

Offline

#3 2015-01-20 17:15:47

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: [ANSWERED] Is it safe to keep this password in plain text?

Thanks for the reply drcouzelis!

That's kind of what I was figuring from my point of view.

Onto a follow up question. If it was important to salt+hash the password, how would I pass that through the .conf. I'm more curious than anything. And I couldn't really figure out what question to type into google to find the answer on my own. Thanks!

Offline

#4 2015-01-20 18:09:38

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [ANSWERED] Is it safe to keep this password in plain text?

My search for "linux safe to store passwords as plain text" came up with this very relevant thread:

http://stackoverflow.com/questions/2664 … plain-text

Summary: No, encrypting the password is not effective. The application needs to be able to access the password by itself, which means whatever method it uses to automatically decrypt a password will also be available to anyone else.

Offline

#5 2015-01-20 18:10:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,353

Re: [ANSWERED] Is it safe to keep this password in plain text?

That particular site does not use passwords.  It uses authorization tokens that you obtain from the site's webpage.   The token becomes part of the URL that is passed into the DNS update request. 
Take a look at https://freedns.afraid.org/scripts/freedns.clients.php and look at the instructions for openWRT to get a feeling for how this works.

If the token is compromised, use your account and password at the site to get a new token.

Edit, BTW -- I use that service on my DD-WRT based router.  Works like a charm.

Last edited by ewaller (2015-01-20 18:11:12)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2015-01-20 18:43:03

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [ANSWERED] Is it safe to keep this password in plain text?

drcouzelis wrote:

My search for "linux safe to store passwords as plain text" came up with this very relevant thread:

http://stackoverflow.com/questions/2664 … plain-text

Summary: No, encrypting the password is not effective. The application needs to be able to access the password by itself, which means whatever method it uses to automatically decrypt a password will also be available to anyone else.

In general, this is an old problem discussed primarily in the context of mail-related software. See http://www.fetchmail.info/esrs-design-notes.html (sadly, thunderbird and claws-mail (and others) will symmetrically encrypt the passwd and not even set restricted permissions on .mozilla or .claws-mail dirs resp.).


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#7 2015-01-20 19:57:52

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,420
Website

Re: [ANSWERED] Is it safe to keep this password in plain text?

sadly, thunderbird and claws-mail (and others) will symmetrically encrypt the passwd and not even set restricted permissions on .mozilla or .claws-mail dirs resp.

math@thinkpad ~ % ls -dl .thunderbird .mozilla
drwx------ 4 math math 37 Jan  3 21:24 .mozilla/
drwx------ 3 math math 48 Jan  4 22:03 .thunderbird/

?


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#8 2015-01-20 21:50:41

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: [ANSWERED] Is it safe to keep this password in plain text?

ewaller wrote:

That particular site does not use passwords.  It uses authorization tokens that you obtain from the site's webpage.   The token becomes part of the URL that is passed into the DNS update request. 
Take a look at https://freedns.afraid.org/scripts/freedns.clients.php and look at the instructions for openWRT to get a feeling for how this works.

If the token is compromised, use your account and password at the site to get a new token.

Edit, BTW -- I use that service on my DD-WRT based router.  Works like a charm.

Your link doesn't go anywhere for me. I get a webpage not available?

Thanks for the clarification about the passwords. It's odd that they include it but it's not needed don't you think?

drcouzelis wrote:

My search for "linux safe to store passwords as plain text" came up with this very relevant thread:
http://stackoverflow.com/questions/2664 … plain-text
Summary: No, encrypting the password is not effective. The application needs to be able to access the password by itself, which means whatever method it uses to automatically decrypt a password will also be available to anyone else.

Thanks for that link. I didn't see that before and your google foo skills are a tad better than mine smile.

Well that definitely answers my question on how to store the passwords. Thanks guys!

Offline

#9 2015-01-20 21:58:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,353

Re: [ANSWERED] Is it safe to keep this password in plain text?

15goudreau wrote:

Your link doesn't go anywhere for me. I get a webpage not available?

Thanks for the clarification about the passwords. It's odd that they include it but it's not needed don't you think?

Perhaps it was because I was logged on to the site when I copied the link hmm
I do not use the same tool that you are trying to use.  In my case, my router is aware of the service and has the code to handle it based on the URL method they talk about on their site.  The only credentials used by the router is the token.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2015-01-20 22:21:24

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [ANSWERED] Is it safe to keep this password in plain text?

Alad wrote:

sadly, thunderbird and claws-mail (and others) will symmetrically encrypt the passwd and not even set restricted permissions on .mozilla or .claws-mail dirs resp.

math@thinkpad ~ % ls -dl .thunderbird .mozilla
drwx------ 4 math math 37 Jan  3 21:24 .mozilla/
drwx------ 3 math math 48 Jan  4 22:03 .thunderbird/

?

Hmm, I clearly remember that at least Claws was not chmod'ing its config dir (I use mutt now). I'll check again. Are you sure you don't have a 0077 umask? Otherwise, I'll take what I said earlier back hmm


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#11 2015-01-21 20:45:30

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,420
Website

Re: [ANSWERED] Is it safe to keep this password in plain text?

Yep, umask 022.

math@thinkpad ~ % umask
022

Haven't seen the need to umask 0077 as I don't have public www folders and stuff.

Last edited by Alad (2015-01-21 20:46:41)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

Board footer

Powered by FluxBB