Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automounting Samba Security Question [Solved]
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
Fallen_Paladin
n00b
n00b


Joined: 27 Jan 2005
Posts: 11

PostPosted: Tue Feb 08, 2005 2:13 pm    Post subject: Automounting Samba Security Question [Solved] Reply with quote

Heya, sorry for posting this, but I did a bit of searching and didn't come up with much. I've just set up samba on this machine and though I've run it in the past, I've never gone to the trouble of adding it to the fstab before. Now I'm trying to do it, but I've got a security concern.

Typically /etc/fstab has permissions = 644 and the mount line for a samba partition is such as
//machine/share /mnt/mntpoint smbfs -o username=<user>,password=<pass>,gid=n,umask=xxx

Now, I've played with slackware a bit in the past, but never really set up anything important enough to worry about security. However, this looks like a potentially easy way to dig up a password for whatever box this client is connecting to. Even a guest can run less /etc/fstab.

I have created a special case username and password for this connection, but I don't want to settle with that. Is there a way I can put the username and password or at least the password in another file and have it read that file when it makes the connection? Is there another way to make this more secure while still having it automatically mount the shares? Or is my concern for nothing?


Last edited by Fallen_Paladin on Tue Feb 08, 2005 2:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Tue Feb 08, 2005 2:32 pm    Post subject: Reply with quote

If your worried about a world readable file, you could add a command to '/etc/conf.d/local.start' point to a root only script to mount the dir at boot.

You might need to add an unmount to '/etc/conf.d/local.stop' to make sure everything is unmounted cleanly.

There is this option on mount too:

Quote:

credentials=<filename>

specifies a file that contains a username and/or password. The format of the file is:

username = <value>
password = <value>

This is preferred over having passwords in plaintext in a shared file, such as /etc/fstab. Be sure to protect any credentials file properly.


G.
Back to top
View user's profile Send private message
Fallen_Paladin
n00b
n00b


Joined: 27 Jan 2005
Posts: 11

PostPosted: Tue Feb 08, 2005 2:45 pm    Post subject: Reply with quote

Thanks. That answers my question.
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