Solved

Best way to connect to Samba (Windows) share on Fedora 13 startup

Posted on 2010-09-16
9
936 Views
Last Modified: 2012-06-21
Hi guys

What's the best way to connect to a SMB share on Fedora 13 machine startup?

I tried updating my rc.local script before but the whole thing hung before login and I had to reformat.

What is the safest way to do this?
0
Comment
Question by:butterhook
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 6

Accepted Solution

by:
fluk3d earned 500 total points
ID: 33690946
0
 
LVL 1

Author Comment

by:butterhook
ID: 33691721
But will this mount be there on startup after restarting?
0
 
LVL 6

Expert Comment

by:fluk3d
ID: 33693064
Yes check the second link
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 26

Expert Comment

by:jar3817
ID: 33693284
I just put the mount command in /etc/rc.d/rc.local

mount -t cifs -o user=username,password=yourpassword,rw //ip.addr/share /mnt/point
0
 
LVL 1

Author Comment

by:butterhook
ID: 33693833
This has now worked - but the problem now is that only root (i.e. when I su) has access to the share to write.

Is there any way I can make it writeable by other users?

Example: when I write touch hello.txt as root I can write to the mounted drive, but doing the same without sudoing then permission is denied to write.
0
 
LVL 2

Expert Comment

by:TheKeyboardSlayer
ID: 33693987
You have to make sure that the USER you are using in the mount command has read/write access to the samba share.

For example, if I have a user named FAMILY and a share that mounts using that user and the password for that user, I need to make sure that the SMB share allows access to family. To do this, I make sure in the smb.conf file that the share allows user FAMILY to access it. You'll have to add in "user = USERNAME" inside the settings for that share in your smb.conf. After that, make sure the username has write access on that directory by using the CHMOD command on that directory to grat the user access.

If you'r e mounting a Windows share and you can't write to it, it's because you haven't specified a UID and a GID (user ID and group ID) in the mount command. Say you have user FAMILY and you want to mount it that way. Add uid=family and gid=users


mount -t cifs -o user=username,password=yourpassword,uid=family,gid=users,rw //ip.addr/share /mnt/point
0
 
LVL 26

Expert Comment

by:jar3817
ID: 33694030
also make sure the permissions are set properly on the mount point. If you want everyone to write to the share (not just root), make sure you chmod 777 on /mnt/point.
0
 
LVL 1

Author Comment

by:butterhook
ID: 33699626
The /mnt/point doesn't seem to be changing permissions when I chmod it to 777 - any idea what I can do?
0
 
LVL 1

Assisted Solution

by:butterhook
butterhook earned 0 total points
ID: 33858639
I included the noperm switch in the mount command and it worked.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now