LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-08-2007, 10:41 PM   #1
Jaze
LQ Newbie
 
Registered: Dec 2006
Posts: 14

Rep: Reputation: 0
automount smbmount


I've found how to smbmount a windows drive but it unmounts every time I log out.

How do I set it up to remount if unmounted?

This is the command I use (now stored as a script file so I don't have to keep looking it up.)

smbmount //192.168.0.22/grande\ \(G\) /home/justin/Desktop/grande

Is there a gui that will allow this mount to be permanent?

Cheers, J
 
Old 02-09-2007, 09:03 PM   #2
elmr007
Member
 
Registered: Aug 2006
Location: Texas
Distribution: FC6
Posts: 60

Rep: Reputation: 15
put it in your /etc/samba/smb.conf file.
 
Old 02-12-2007, 09:23 PM   #3
Jaze
LQ Newbie
 
Registered: Dec 2006
Posts: 14

Original Poster
Rep: Reputation: 0
didn't work for me, is there another solution?

By put it in the /etc/samba/smb.conf file you mean add the line
smbmount //192.168.0.22/grande\ \(G\) /home/justin/Desktop/grande to it somewhere?
 
Old 02-13-2007, 01:28 PM   #4
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 14, 15, RHL 5.2, Gentoo
Posts: 519

Rep: Reputation: 36
The Windows share should not be unmounting when you log out. It is more likely unmounting when you shutdown. Mounting a Windows share to the Linux filesystem does not involve smb.conf. That is used for configuring samba to establish shares on Linux.

It sounds like what you want to do is mount your Windows share onto the Linux filesystem when you boot. This is done through /etc/fstab. You set up the entry to use a type of smbfs. I would recommend using the credentials option and placing your windows username and password in a file only accessible by root. The man page for smbmount has some details on how to setup the file.

Entry in /etc/fstab would look something like:
Code:
//192.168.0.22/grande\ \(G\) /home/justin/Desktop/grande smbfs uid=500,gid=500,credentials=/etc/grande 0 0
You'll probably want to set up the uid and gid to the same defaults of user justin.

There are two things I would change if this were my setup. First would be to change the IP address to the name of your windows server. For small networks you can use the /etc/hosts file for that (see man hosts). The other thing is the name of your share. grande\ \(G\) is not very friendly. Why not just use grande and be done with it?

If your windows box is not always up, you'll have to approach this a little differently. Perhaps by using autofs. I would have to read up on autofs to tell you how to set it up that way.

Bill
 
Old 02-14-2007, 12:18 AM   #5
Jaze
LQ Newbie
 
Registered: Dec 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks wmakowski, that looks like the trick. Yes the //192.168.0.22/grande\ \(G\) is causing problems.
There are no user names or passwords so I take it a credential of guest would fix this. As soon as I have put the entry into fstab, written and quit, I get a dialog prompting me with what action I'd like to take. opening it at the moment results in /media/grande\ as the mount point so definitely need to change the shared folder name or somehow make an alias I can use as there are a bunch of other people already using this share name. Not sure that there is any other solution... to get around the problematic share name.
 
Old 02-14-2007, 09:59 AM   #6
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 14, 15, RHL 5.2, Gentoo
Posts: 519

Rep: Reputation: 36
Windows will allow you to create multiple share names for the same resource. Perhaps you can get another entry made on the windows server. What does your entry in /etc/fstab look like? It doesn't sound right to me that the mount point becomes /media/grande\. I haven't tried this yet, but since it is a guest type share you could probably use username=guest rather than credentials=/etc/grande

Bill

Last edited by wmakowski; 02-14-2007 at 10:02 AM.
 
  


Reply

Tags
automount, smbmount


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I do an smbmount ?? WindowBreaker Linux - Networking 11 12-26-2005 06:47 PM
smbmount Red Squirrel Linux - Networking 1 08-24-2005 05:28 AM
I have no smbmount! Vincent_Vega Linux - Networking 4 03-15-2004 12:22 PM
smbmount? mbtoys Linux - Networking 0 08-29-2003 08:10 AM
smbmount etc GrayLOK Linux - Networking 5 07-21-2002 02:37 AM


All times are GMT -5. The time now is 02:39 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration