LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-24-2019, 08:17 PM   #1
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
~/.mailrc and smtp-auth-password


Is there any way with the mailx mailrc config to hash the smtp-auth-password entry?

I can protect ~/.mail rc with permissions, but that still does not hash the actual password.

I have a use case where I would like to use a ~/.mailrc config but the system is multi-user and several people have root. Yes, a human trust issue, but nonetheless uncomfortable to hard-code a password in clear text on any system.

Thanks.
 
Old 06-25-2019, 04:18 AM   #2
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
I didin't test, but this may be of some help:

Quote:
You can further diversify things and use encrypted password storage, since ArchLinux compiles in password agent support. To adjust the example, simply do not specify the password PASS token in $HOME/.netrc but instead uncomment the agent-shell-lookup line in the example account above.
 
Old 06-25-2019, 07:00 PM   #3
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 765

Rep: Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864
I use mailx with msmtp (SMTP client, on slackbuilds.org) for sending out emails from the command line. Msmtp allows password storing methods other than plain text. In my case I created a password file that's encrypted using gpg. In the .msmtprc config file I set "passwordeval gpg -q -d ~/.email_pwd.gpg". This sets up the mail command to call gpg for handling the decryption and pulls the password from stdout of gpg.

Im not sure if/how to do it from the mailrc config directly though. Using msmtp, my .mailrc config is only contains "set sendmail=usr/bin/msmtp". Maybe someone else can chime in with a better idea but at least this setup isn't storing the password in plain text anywhere.
 
Old 07-03-2019, 04:00 PM   #4
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
I haven't had time to dig into this further.

On reflection, while hashing prevents a "curious" workmate from learning my email account password, in my use case several users have root. Such a user could just su into my account. The hashing prevents learning the password but cannot prevent rogue behavior using my email account. I don't expect that to happen but we don't have good auditing configured on our systems. Yeah, I'm pushing tinfoil hat territory here.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/pam.d/system-auth-ac vs. /etc/pam.d/password-auth-ac vs. /etc/pam.d/sshd christr Red Hat 2 08-01-2014 07:08 PM
[SOLVED] SMTP AUTH with sendmail in centos.. 504 5.3.3 AUTH mechanism LOGIN not available satyadev75 Linux - Server 3 01-23-2014 02:30 AM
smtp auth with sendmail through smtp.sbcglobal.yahoo.com woodson2 Fedora 0 10-23-2008 02:55 PM
set .mailrc to get server down message on pager livetoday20 Linux - Newbie 2 03-04-2008 10:57 AM
SMTP "open relay" and SMTP AUTH aikempshall Linux - Security 3 10-11-2006 08:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration