Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 7th June 2005, 01:32 AM
mellis95 Offline
Registered User
 
Join Date: Apr 2005
Location: East Texas
Posts: 99
Auto mount Samba Share

What is the best way to automatically mount a Samba share upon successfull login? I haven't done any scripting, so if that is the answer, which I believe it might be, please explain what I will need to do. The shares I want to mount are on a CentOS server and I want to mount them on my laptop, which has FC3.

Thanks for the help
__________________
Matt
Reply With Quote
  #2  
Old 7th June 2005, 02:01 AM
strikeforce Offline
Registered User
 
Join Date: Jun 2004
Location: Perth, Western Australia
Age: 36
Posts: 1,464
In your /etc/fstab you can 'automagically' set it up. If you have share level set to user you can create your own username and password in a file that can be accessed on boot.

This will enable you to mount them all on startup.
Reply With Quote
  #3  
Old 7th June 2005, 02:10 PM
mellis95 Offline
Registered User
 
Join Date: Apr 2005
Location: East Texas
Posts: 99
No luck editing fstab. Maybe I am doing it wrong? I am adding the following at the end of the fstab file:

smbmount //ipaddress/sharename /mnt/mountpoint

This works when run in a terminal. What is the syntax for my fstab file? Thanks for helping me out.
__________________
Matt
Reply With Quote
  #4  
Old 8th June 2005, 01:37 AM
lnmn's Avatar
lnmn Offline
Registered User
 
Join Date: Apr 2005
Posts: 39
try this

# vi /etc/fstab

add the following line with your values :
//localhost/share /mountpoint smbfs auto,username=usrname,password=passwd 0 0

after you save and close mount it with :
# mount /mountpoint

It just worked for me

lnmn
Reply With Quote
  #5  
Old 8th June 2005, 01:48 AM
strikeforce Offline
Registered User
 
Join Date: Jun 2004
Location: Perth, Western Australia
Age: 36
Posts: 1,464
yeah thats how you do it. Sorry only just got to work now to check the responses. I'm in Australia so the time differential is about 12 hours.

Anyways that should work for you. IF not please post what the error is in the /var/logs
Reply With Quote
  #6  
Old 10th June 2005, 11:38 AM
ugra's Avatar
ugra Offline
Registered User
 
Join Date: Jun 2005
Posts: 4
Question Automount windows shared directories onto a FC3 system using samba

I am trying to automount remote windows diretcories onto my FC3 installation using samba ..

Here is what I did ..

[1] Created a mount directory
/root/wincli

[2] Edited /ets/fstab to add the following line ...
//blrk99dd/share_ringo /root/wincli smbfs credentials=/root/.smbpassword,workgroup=IN002,uid=500,gid=500,dmask =777,fmask=777,umask=000,ro 0 0

where credentials file has the username, password ..

[3] and run the follwing command as root ..
mount /root/wincli

and when I do a ls -l in the directory /root i get the following properties for the folder /root/wincli .. the mount directory ..
?--------- ? ? ? ? ? wincli
which previously used to be
drwxr-xr-x 2 root root 4096 Jun 10 11:47 wincli

Can someone please help .. and is this a FC3 specific problem due to some security enhancements that it has implemented ?

Many thanks,
Ugra
Reply With Quote
  #7  
Old 10th June 2005, 02:50 PM
lnmn's Avatar
lnmn Offline
Registered User
 
Join Date: Apr 2005
Posts: 39
Quote:
Originally Posted by ugra
//blrk99dd/share_ringo /root/wincli smbfs credentials=/root/.smbpassword,workgroup=IN002,uid=500,gid=500,dmask =777,fmask=777,umask=000,ro 0 0
I believe the .smbpasswd file is for accessing a share on your FC3 box from a different box whether it be Linux or windows. You shouldnt need the 'workgroup' option unless of course you are accessing different workgroup other than the one specified in your /etc/samba/smb.conf. Ther uid gids...... are specified by the share your are accessing. If your looking for permersions on the folder /root/wincli change the permissions on that paticluar folder. the best thing to do is enter the line exactly in my above post to see if it works then try your version
Reply With Quote
  #8  
Old 11th June 2005, 07:50 AM
gavinw6662 Offline
Registered User
 
Join Date: Feb 2005
Age: 34
Posts: 1,281
Quote:
Originally Posted by lnmn
try this

# vi /etc/fstab

add the following line with your values :
//localhost/share /mountpoint smbfs auto,username=usrname,password=passwd 0 0

after you save and close mount it with :
# mount /mountpoint

It just worked for me

lnmn
I just did that, and it works like a charm!!
Reply With Quote
  #9  
Old 15th June 2005, 05:17 AM
ugra's Avatar
ugra Offline
Registered User
 
Join Date: Jun 2005
Posts: 4
Unhappy Tried .. the same but problem not resolved

Hello ,
I tried this .. on my FC3 box ..

trying to mount a windows share on MyWindowsMachines onto my FC3 mountpoint
//MyWindowsMachineShare /mountpoint smbfs auto,username=usrname,password=passwd 0 0

but it isnt working I get the permissions on the mounted directory as ..
?--------- ? ? ? ? ? wincli
Have used the usrname and password for the account in MyWindowsMachine
It mounts allright but then beacuse of the unknown permissions its unusable ..
cannot change the permissions on this directory also ..

those who got the above working is yours an FC3 box too ??

Thanks for helping out ..
Ugra !
Reply With Quote
  #10  
Old 15th June 2005, 05:27 AM
strikeforce Offline
Registered User
 
Join Date: Jun 2004
Location: Perth, Western Australia
Age: 36
Posts: 1,464
unmount it and make sure the permissions are correct before you mount it. Also can you please show the full statement I think it might be in the wording of it.

e.g.
Quote:
//machinename/share /mnt/mountpoint smbfs auto,username='actualusername',password='actualpas sword' 0 0
Reply With Quote
  #11  
Old 16th June 2005, 05:03 AM
ugra's Avatar
ugra Offline
Registered User
 
Join Date: Jun 2005
Posts: 4
Exact procedure I am following and its not working ..

Hello People,
Thanks for all the help .. am still working on it .. not quite got it yet .. wonder why its such a problem

Ok what I do it create a directory .. /mnt/winclient
[root@LINBOX ~]# mkdir /mnt/winclient
[root@LINBOX ~]# ls -l /mnt/
drwxr-xr-x 2 root root 4096 Jun 16 09:22 winclient
[root@LINBOX ~]# vi /etc/fstab
//WINBOX/share /mnt/winclient smbfs credentials=/home/linusername/.smbpassword,workgroup=IN002,uid=linusername,gid=l inusername,dmask=777,fmask=777,umask=000,rw
0 0 (even if i change the uid and gid to 'root' - same problem, even without the workgroup, dmask, umask)
[root@BLRKBADD ~]# mount /mnt/winclient/
[root@BLRKBADD ~]# ls -l /mnt/
total 40
?--------- ? ? ? ? ? winclient
drwxr-xr-x 18 linusername linusername 8192 Jan 1 1970 wind
[root@BLRKBADD ~]

hmm .. then I found that you can mount SMB shares using konqueror GUI so I went ahead and ran koquerer
and I get the same result even there after mounting the share that I wanted ..

[root@BLRKBADD ~]# ls -l /root/smb_network/132.186.193.148/
total 0
?--------- ? ? ? ? ? share_r
[root@BLRKBADD ~]#

Any pointers in this direction would be great help ! has anyone mounted remote windows shares using FC3 and got it working ?

Many thanks,
Ugra
Reply With Quote
  #12  
Old 16th June 2005, 05:48 AM
gavinw6662 Offline
Registered User
 
Join Date: Feb 2005
Age: 34
Posts: 1,281
//machinename/share /mnt/mountpoint smbfs auto,username='actualusername',password='actualpas sword' 0 0

I use this method, instead of smbfs i use cifs. When i log in, it is all set up for me. Love it!!
Reply With Quote
  #13  
Old 16th June 2005, 05:49 AM
strikeforce Offline
Registered User
 
Join Date: Jun 2004
Location: Perth, Western Australia
Age: 36
Posts: 1,464
It looks like a bad mount but for some reason I've never had it I'm not sure where to go at the moment.

Can you try auto instead of smbfs and then on top of that can you also try an ip instead of a windbox name. I've always found the ip works but the name doesn't thats just my experience.

What happens when you try the following command.

smbclient -L //WINBOX

It should give you a list of possible shares.

*Edit

Try the suggestion above it might have changed to cifs?

Last edited by strikeforce; 16th June 2005 at 05:53 AM.
Reply With Quote
  #14  
Old 16th June 2005, 12:15 PM
lnmn's Avatar
lnmn Offline
Registered User
 
Join Date: Apr 2005
Posts: 39
Are you running SP2 on the winbox? If so check your firewall.
Are you in the same Workgroup? Subnet?
Reply With Quote
  #15  
Old 17th June 2005, 03:43 AM
ugra's Avatar
ugra Offline
Registered User
 
Join Date: Jun 2005
Posts: 4
Thumbs up Mounting remote windows shares - Using CIFS instead of SMBFS

Hi All,

This just worked fine for me .. Thanks much Gavin
using cifs instead of smbfs ..

Quote:
Originally Posted by gavinw6662
//machinename/share /mnt/mountpoint smbfs auto,username='actualusername',password='actualpas sword' 0 0

I use this method, instead of smbfs i use cifs. When i log in, it is all set up for me. Love it!!
using smbfs causes problems check out ..

1) [Samba] [PATCH] smbfs: smbfs do not honor uid, gid, file_mode and dir_mode supplied by user mount - post on the samba forums ...
http://lists.samba.org/archive/samba...er/094405.html

2) Samba frustration root cant mount regular user gets wrong permissions
http://forums1.itrc.hp.com/service/f...hreadId=772038

Ugra
Reply With Quote
Reply

Tags
auto, mount, samba, share

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
can't mount my samba share grocanar Using Fedora 15 1st July 2008 03:28 PM
Need to mount samba share eXDee Servers & Networking 7 16th October 2006 05:22 AM
Mount Mac OSX Samba share pulse00 Servers & Networking 0 15th October 2006 10:45 PM
FC3 auto mount HDD and start samba cjohnson_uk EOL (End Of Life) Versions 4 11th March 2005 08:22 PM
auto mount windows share for users ashokcm Servers & Networking 8 11th February 2005 03:50 AM


Current GMT-time: 19:24 (Friday, 24-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