Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 13th June 2006, 01:46 PM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
Question safe automount with cifs at startup

Hi people,

how can I safely automount a shared folder with Fedora Core 5 at startup?

I know as much as adding the following line to the startup-script

Code:
 mount -t cifs -o ro,user=user,workgroup=company,password=verysecret //server/shared /mnt/shared
but the problem is that the password is potentially readable.

Is there any safe way to mount a shared folder?
__________________
IMagination has the power to change LIFE!
Reply With Quote
  #2  
Old 19th June 2006, 10:45 AM
foobar47's Avatar
foobar47 Offline
Registered User
 
Join Date: Nov 2005
Location: France - Lille
Posts: 406
Hi,

Why don't you add an account which is just able to share this folder ?
Cheers.
__________________
My WebPage
RHCT for the moment !
Reply With Quote
  #3  
Old 19th June 2006, 10:52 AM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
How do you mean?
Note that I'm not running any kind of Xwindows/desktop.
Just plain -Bash.
Reply With Quote
  #4  
Old 19th June 2006, 04:23 PM
foobar47's Avatar
foobar47 Offline
Registered User
 
Join Date: Nov 2005
Location: France - Lille
Posts: 406
If you're afraid about the password, you just add an new user account and just allow this account to view this shared folder.

Like that, you can mount your share with this account and if someone take the password, it will juste be able to view the shared folder...

Do you understant what i mean... sorry to not be more clear...
__________________
My WebPage
RHCT for the moment !
Reply With Quote
  #5  
Old 19th June 2006, 08:17 PM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
Ah, you mean to create an account with user "mounteneer" in Linux.
Have the windows-share "transfer" allow user "mounteneer" to connect.
And have a start-up script in Linux automatically mount to "transfer" with account "mounteneer"/
Right?
How would such a start-up script look like, and where do I place it?

Last edited by Bl4deRunner; 21st June 2006 at 08:46 AM.
Reply With Quote
  #6  
Old 20th June 2006, 10:16 PM
Northern Offline
Registered User
 
Join Date: Nov 2004
Posts: 55
You can use the 'credentials' option.

ie
mount -t cifs -o ro,credentials=/somewhere/.cred,workgroup=company //server/shared /mnt/shared

Then make /somewhere/.cred readable only by root.

Nick .
Reply With Quote
  #7  
Old 21st June 2006, 08:42 AM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
Thanks a lot! Now I understand what credentials is used for.

But what's the best location to place the automount-command, when the mounted directory should be accessible for services? (.bash_profile is obviously not an option)

Last edited by Bl4deRunner; 21st June 2006 at 08:47 AM.
Reply With Quote
  #8  
Old 21st June 2006, 11:33 AM
Northern Offline
Registered User
 
Join Date: Nov 2004
Posts: 55
Why not just put it in /etc/fstab ?

Here's an entry from one of our servers -

lamda:/LAMDAFTP /db/code/lamda/lamdamp cifs credentials=/db/code/lamda/.cred,defaults 0 0

Works like a charm
Reply With Quote
  #9  
Old 22nd June 2006, 07:02 AM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
Great! Thanks!

What does your code do?
lamda doesn't exist in FC5, but I guess you meant lambda?
I read the man and the --help text, but it still doesn't give me a clue what it's for.
www.Google.com/linux is my next step.

Last edited by Bl4deRunner; 22nd June 2006 at 08:10 AM.
Reply With Quote
  #10  
Old 22nd June 2006, 02:52 PM
landoncz's Avatar
landoncz Offline
Registered User
 
Join Date: Dec 2005
Location: Florida, USA
Age: 34
Posts: 338
To be really secure you can use sshfs which is like NFS, but over SSH so it is encrypted and just as secure as SSH. I am using that and have had no problems with it whatsoever... Very secure...
__________________
Fedora Core 6 on Asus Z63A 14" Laptop
2.0 Ghz Pentium M
1 Gig RAM
100 Gig 7200 RPM

Code:
# rm -rf /dev/brain
Reply With Quote
  #11  
Old 22nd June 2006, 11:23 PM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
How does that work?
Reply With Quote
  #12  
Old 23rd June 2006, 12:16 AM
landoncz's Avatar
landoncz Offline
Registered User
 
Join Date: Dec 2005
Location: Florida, USA
Age: 34
Posts: 338
http://fuse.sourceforge.net/wiki/index.php/SshfsFaq
There was a really easy to follow article in linux journal a couple of months ago. Basically it is just installable via yum, and you mount it like this:

Code:
sshfs -f user@ssh_server: /home/your_mount_point
And then you can see everything through the desktop but it is being transferred via SSH so it's secure. Then to unmount, its somehting like this:

Code:
fusermount -u /home/your_mount_point
I am leaving out a few SSH setup stuff like keys and such but if you have trusted SSH login with that server, then there is no additional setup needed...
__________________
Fedora Core 6 on Asus Z63A 14" Laptop
2.0 Ghz Pentium M
1 Gig RAM
100 Gig 7200 RPM

Code:
# rm -rf /dev/brain
Reply With Quote
  #13  
Old 23rd June 2006, 11:04 PM
Northern Offline
Registered User
 
Join Date: Nov 2004
Posts: 55
Quote:
Originally Posted by Northern
Why not just put it in /etc/fstab ?

Here's an entry from one of our servers -

lamda:/LAMDAFTP /db/code/lamda/lamdamp cifs credentials=/db/code/lamda/.cred,defaults 0 0

Works like a charm
Hi again, sorry for the late reply.

lamda is the name of the windows server, so really its like this

wiindows_server_name:/windows_server_share_name /path_to_mount_on cifs credentials=/wherever/somefile 0 0

And the file that credentials= points to contains the username password for the windows share.

Hope that helps,
Nick .
Reply With Quote
  #14  
Old 26th June 2006, 10:11 PM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
Oh really! I never realised it could also be written like that! I never saw anything like that in the manual... Linux is full of surprices.
So basically I can use
server:/shared /mnt/mydrive cifs credentials=/root/.cred,defaults (what does 0 0 stand for? can I just say rw)

Last edited by Bl4deRunner; 26th June 2006 at 10:14 PM.
Reply With Quote
  #15  
Old 28th June 2006, 06:18 AM
Bl4deRunner Offline
Registered User
 
Join Date: Jan 2006
Location: Netherlands
Posts: 16
hmm.. maybe I misunderstood something, or I'm missing something...
when I type server:/shared I get the error:
Code:
-bash: server3:/buitendienst: No such file or directory
Reply With Quote
Reply

Tags
automount, cifs, safe, startup

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AVAHI Daemon Failed on startup and other startup issues. Please help !!!! unanemus Using Fedora 2 24th November 2009 12:27 AM
am i safe? grubster Security and Privacy 1 29th April 2009 02:15 PM
automount on startup ene_dene Using Fedora 2 20th April 2008 01:57 AM
automount drives on startup adithveeresh Hardware & Laptops 7 22nd October 2007 06:06 PM


Current GMT-time: 01:52 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat