Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Want to encrypt credentials file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
skarecrow
n00b
n00b


Joined: 03 Nov 2003
Posts: 25
Location: $HOME

PostPosted: Wed Mar 15, 2006 4:25 pm    Post subject: Want to encrypt credentials file Reply with quote

Hi,

I am mounting multiple network filesystems via cifs. The servers that are hosting the shares are part of a domain and require proper authentication. Here is what my /etc/fstab looks like.

Code:
//192.168.110.10/Share   /mnt/sites/Server1 cifs           credentials=/root/credentials   0 0
//192.168.105.10/Share   /mnt/sites/Server2 cifs           credentials=/root/credentials   0 0


The file systems mount perfectly using a credentials file that looks like this.

Code:
username=user
password=pass


Is there a good way to encrypt the credentials file so that i no longer have this plain text file sitting around with domain login info in it :?:

Thanks!
Back to top
View user's profile Send private message
unclecharlie
Apprentice
Apprentice


Joined: 19 Dec 2005
Posts: 186
Location: Colorado, USA

PostPosted: Wed Mar 15, 2006 9:24 pm    Post subject: use cryptoloop... Reply with quote

skarecrow,
You can place the credentials file on an encrypted loopback filesystem. But then you've got the key for your encrypted filesystem in plaintext. Also, you still have to mount that encrypted filesystem (which decrypts it) to access the file. However, you could have a script mount the encrypted fs prior to mounting the shares, then unmount it once the shares are mounted.

see man losetup for details.

Charlie

p.s.- This probably isn't the only way (or even the best way) to encrypt this information. It was just the first one to come to mind...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum