LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices


Reply
  Search this Thread
Old 04-13-2008, 06:37 PM   #1
rtoney5
Member
 
Registered: Oct 2007
Location: FL, US
Distribution: Ubuntu MintLinux, ChromeOS, Parted Magic, PCOS OpenWorkstation, OpenSuse-11
Posts: 139

Rep: Reputation: 24
Can you Mount SMB Shares to your /mnt directory??


I have SimplyMepis and wanted to know when you mount your smb shares, can you mount them somehow in your /mnt directory. Is it imilar to mounting an .iso file like (mount -o loop /mnt/hda6/SomeFile.iso /mnt/isos). The reason I wanted to mount the smb share is because I wanted to run a command like the following to see what directories over the network PCs I have (du -s -B 1024k /home/* | sort -n). Thanks.
 
Old 04-13-2008, 08:56 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Yes. You need to create a mount point first, but the you can mount it on /mnt/remotehostname or whatever. If you already have something mounted on a subdirectory of /mnt/, such as /mnt/isos; then mounting over /mnt/ itself will hide any existing mounts.

Use the "cifs" filetype if possible instead of smbfs. Smbfs is obsolete.
You can also add an entry in /etc/fstab for each computer you want to mount. This can save you typing later. Also, consider creating a credentials file and using that in your /etc/fstab entry or mount command. That prevents the password from being world readable if you use password= in the /etc/fstab entry.

Please read the mount.cifs and mount manpages for more options. If you mount your home directory on another machine and use the cifs filesystem, then you can use the normal Linux permissions. Even the setfacl command will work as long as the target computers filesystem supports acls.
 
Old 04-13-2008, 10:36 PM   #3
rtoney5
Member
 
Registered: Oct 2007
Location: FL, US
Distribution: Ubuntu MintLinux, ChromeOS, Parted Magic, PCOS OpenWorkstation, OpenSuse-11
Posts: 139

Original Poster
Rep: Reputation: 24
Thanks. One more question though... How do you add a computer to your /etc/fstab file? Do you have a sample of how it should look? I understand the format of the entries like this one (/dev/hda6 /mnt/hda6 ext3 user,exec,rw,noauto 0 0), but don't know if I replace the /dev/hda6 with a computer name? I don't know what the format would be for this. Thanks again.
 
Old 04-14-2008, 04:31 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
/etc/fstab entry example:
Code:
//hpmedia/jschiwal      /home/jschiwal/hpmedia  cifs    defaults,users,uid=jschiwal,file_mode=0117,dir_mask=007,gid=jschiwal,cred=/home/jschiwal/.credentials 0 0
If the filesystem being shared can handle permissions and acls then the file_mode and dir_mask entries are ignored. The cred option is the location of the credentials file which looks like this:
Code:
username=jschiwal
password=XXXXXXXX
I used a hidden file just so it doesn't show up normally. It contains a password so make sure it isn't world readable.
See the "mount" and "mount.cifs" and "fstab" manpages for more info.
 
Old 04-19-2008, 11:32 PM   #5
rtoney5
Member
 
Registered: Oct 2007
Location: FL, US
Distribution: Ubuntu MintLinux, ChromeOS, Parted Magic, PCOS OpenWorkstation, OpenSuse-11
Posts: 139

Original Poster
Rep: Reputation: 24
Hey thanks again, i will give it a try.
 
Old 04-21-2008, 05:34 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
This may be a time when "RTM" may not be so impolite : man fstab or, in Konqueror man:/fstab #fstab
-- either of these will display the man page as HTML, & w/ clickable links.

If there's anything in the man page that is confusing, please post back.
 
Old 04-28-2008, 03:24 PM   #7
rtoney5
Member
 
Registered: Oct 2007
Location: FL, US
Distribution: Ubuntu MintLinux, ChromeOS, Parted Magic, PCOS OpenWorkstation, OpenSuse-11
Posts: 139

Original Poster
Rep: Reputation: 24
Ummm what r u talking about ??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
since upgrade debian sarge>etch can't mount smb-shares with ads t0bias Linux - Server 0 06-20-2007 04:22 AM
Mounting SMB shares - Could not resolve mount point Wynd Linux - Networking 3 04-23-2006 01:15 PM
mount smb shares at boot gvaught Debian 12 06-13-2005 11:34 AM
SMB won't mount Windows Server Shares galliar Linux - Networking 1 05-11-2005 10:31 AM
/mnt directory stalls because of samba shares quantum10 Linux - Software 0 05-14-2004 10:41 AM

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

All times are GMT -5. The time now is 12:39 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