[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 962
  • Last Modified:

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

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
butterhook
Asked:
butterhook
  • 4
  • 2
  • 2
  • +1
2 Solutions
 
butterhookAuthor Commented:
But will this mount be there on startup after restarting?
0
 
fluk3dCommented:
Yes check the second link
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
jar3817Commented:
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
 
butterhookAuthor Commented:
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
 
TheKeyboardSlayerCommented:
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
 
jar3817Commented:
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
 
butterhookAuthor Commented:
The /mnt/point doesn't seem to be changing permissions when I chmod it to 777 - any idea what I can do?
0
 
butterhookAuthor Commented:
I included the noperm switch in the mount command and it worked.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now