{"id":314,"date":"2011-09-10T20:49:34","date_gmt":"2011-09-11T01:49:34","guid":{"rendered":"http:\/\/www.rajatswarup.com\/blog\/?p=314"},"modified":"2011-09-10T20:49:34","modified_gmt":"2011-09-11T01:49:34","slug":"truecrypt-password-in-history-file","status":"publish","type":"post","link":"https:\/\/www.rajatswarup.com\/blog\/2011\/09\/10\/truecrypt-password-in-history-file\/","title":{"rendered":"Truecrypt password in history file"},"content":{"rendered":"<p>To avoid saving the truecrypt password in history files and mounting the Truecrypt partitions on bash the following trick helps:<\/p>\n<p><code>history -d $((HISTCMD-1)) &amp;&amp; sudo truecrypt --mount &lt;PATH_TO_TRUECRYPT_VOL&gt; --non-interactive -p &lt;PASSWORD&gt;<\/code><\/p>\n<p>This will avoid saving the password in the .bash_history file and also mount the truecrypt volume from the command line.\u00a0 Of course, if you use this in a shell script then the shell script will have the password in it, so you must not do that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To avoid saving the truecrypt password in history files and mounting the Truecrypt partitions on bash the following trick helps: history -d $((HISTCMD-1)) &amp;&amp; sudo truecrypt &#8211;mount &lt;PATH_TO_TRUECRYPT_VOL&gt; &#8211;non-interactive -p &lt;PASSWORD&gt; This will avoid saving the password in the .bash_history file and also mount the truecrypt volume from the command line.\u00a0 Of course, if you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[230],"tags":[208,439,272,440],"class_list":["post-314","post","type-post","status-publish","format-standard","hentry","category-howto","tag-bash","tag-command-line","tag-linux","tag-truecrypt"],"_links":{"self":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":1,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/314\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/314\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/media?parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/categories?post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/tags?post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}