Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 47

Thread: [HOW TO] Mounting smbfs Shares Permanently

  1. #31
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    6,280
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: [HOW TO] Mounting smbfs Shares Permanently

    not sure what you mean about being sustainable? If the machine that has the remote share being mounted locally goes down, there's not much you can do about this. just have to mount it again after it's back up. I suppose you could write some kind of cron job that checks whether the host is "UP" by pinging it, if a successful ping then use the mount command, if no successful ping, don't mount it.

    The only reason you need to use sudo when using smbmount is because either the credentials isn't readable by the person issuing the mount command or that the folder you're trying to mount the remote share to isn't owned by the person issuing the mount command. otherwise, you don't have to use sudo.

  2. #32
    Join Date
    Sep 2007
    Beans
    6

    Question Re: [HOW TO] Mounting smbfs Shares Permanently

    What happens if the Windows COmputer dosnt have a password

  3. #33
    Join Date
    Sep 2007
    Beans
    20

    Re: [HOW TO] Mounting smbfs Shares Permanently

    Quote Originally Posted by dannyboy79 View Post
    not sure what you mean about being sustainable? ...

    The only reason you need to use sudo when using smbmount is ....
    I think you understand, I just want the machine to heal itself,lol. Gnome has some type of watchdog for it's Network-Browser feature. It senses when a host goes away and comes back. Gnome has a connect that puts a ghost link to the share, what I think I need is a Gnome mount (or map) that has some watchdog feature and works like the connect with features of autofs. I'll work it out.

    I can use smbumount and smbmount as a non-root (chmod u+s) fixed that. It's just hard to explain to the wife that when things don't work she has to go hands-on. I don't see a Mac in my future, I like ubuntu, just "gotta" make it work.

    I seek to learn and get these machines to do what they were born to do ..... serve ME!

    thanks, all input helps.
    Last edited by piagent; October 4th, 2007 at 01:02 PM.

  4. #34
    Join Date
    Sep 2007
    Beans
    20

    Re: [HOW TO] Mounting smbfs Shares Permanently

    Quote Originally Posted by ralvynl View Post
    What happens if the Windows COmputer dosnt have a password
    I ran into the same issues, I have an old machine with W98 running in the middle of three ubuntus and one RH (soon to be retired and come back as ubuntu).

    I think you have two options:

    1)turn on the windows client feature in your windows network settings (also file and print share if you plan to share out from that machine). when you boot up you should be asked for a user name and password. You can add this to your samba config .... i'm assuming your windows machine is subordinate. If your not asked you can go to your start and see a logon/logoff menu item.

    2)Run your samba as "share" vs "user". Very unpopular if your security minded. I use this method on all my machines plus the force statements to make the create and writes to be owned my the local user who shared out. Once I did this my wife got very happy. Both of us can share, add, delete, and modify at will.

    I'm not an expert in this area.

  5. #35
    Join Date
    Nov 2007
    Beans
    2

    Re: [HOW TO] Mounting smbfs Shares Permanently

    Quote Originally Posted by RomanW View Post
    I followed this How To and it was useful and helpful to me. I can mount all shares flawlessly, I only have one problem: I can't mount shares that have a space in the directory name. e.g: the directory in this fstab line:

    Code:
    //Enigma-V2/Mijn Muziek /home/blaatmeister/Desktop/Samba/Muziek smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    When I type sudo mount -a in the terminal, I get the following error:

    Code:
    [mntent]: line 12 in /etc/fstab is bad
    Line 12 is the line I previously gave.

    I tried all these variations of line 12:

    Code:
    "//Enigma-V2/Mijn Muziek" /home/blaatmeister/Desktop/Samba/Muziek smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    Code:
    //Enigma-V2/Mijn\ Muziek /home/blaatmeister/Desktop/Samba/Muziek smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    Code:
    '//Enigma-V2/Mijn Muziek' /home/blaatmeister/Desktop/Samba/Muziek smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    They all give me the same error message as the original line.

    With the combination
    Code:
    //Enigma-V2/Mijn\Muziek /home/blaatmeister/Desktop/Samba/Muziek smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    I get this error message:
    Code:
    12455: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid share name)
    SMB connection failed
    This is my entire fstab file:

    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc                                       /proc          proc         defaults                    0  0  
    # /dev/sda2
    UUID=473804f9-e426-4057-92b3-43e86ae6fa4e  /              ext3         defaults,errors=remount-ro  0  1  
    # /dev/sda5
    UUID=3d55a66d-1a14-487c-aaf0-f5e8bafb098a  none           swap         sw                          0  0  
    /dev/hdc                                   /media/cdrom0  udf,iso9660  user,noauto                 0  0  
    /dev/hdd                                   /media/cdrom1  udf,iso9660  user,noauto                 0  0  
    //Enigma-V2/Downloads /home/blaatmeister/Desktop/Samba/Downloads smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    //Enigma-V2/Mijn\Muziek /home/blaatmeister/Desktop/Samba/Muziek smbfs credentials=/home/blaatmeister/.smbpasswd,uid=blaatmeister 0 0
    Since the mount on line 11 works, there's nothing wrong with my .smbpasswd file.

    I can also mount the share without a problem in the terminal using the command:

    sudo smbmount "//Enigma-V2/Mijn Muziek" /home/blaatmeister/Desktop/Samba/Muziek -o credentials=/home/blaatmeister/.smbpasswd


    I'm hoping that someone here can tell me how I can mount the share using the fstab file. Thanks in advance.
    Found the answer in another forum post:
    http://ubuntuforums.org/archive/index.php/t-27823.html
    It turns out that you need to escape each space character with '\040', without the quotes.
    Who would have guessed?
    It totally works. Now my fstab looks like this:
    # /etc/fstab: static file system information.
    ## /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda1
    UUID=cefe7dc6-664a-41cf-a326-6eb61d19581f / ext3 defaults,errors=remount-ro 0 1
    # /dev/sda5
    UUID=4a6287a1-820f-4fad-bba1-f76bd10befeb none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
    //PBEARD/My\040Music /home/madeline/My\040Music smbfs username=defaults,password=defaults 0 0
    //PBEARD/SharedDocs /home/madeline/SharedDocs smbfs username=defaults,password=defaults 0 0
    Last edited by oh.mynameiscupid; November 15th, 2007 at 07:10 AM.

  6. #36
    Join Date
    Oct 2007
    Beans
    16

    Re: [HOW TO] Mounting smbfs Shares Permanently

    Wow, in the GUI, I just tell it to connect to server, type in smb://IP address of computer with share/"share" or share folder name and it works like a champ

  7. #37
    Join Date
    Jun 2007
    Beans
    213

    Re: [HOW TO] Mounting smbfs Shares Permanently

    Hi,

    A bit of background... I have my main Mythbuntu box set up as a bit of a file server, with all the family's documents stored on it. Each family members documents are 'owned' by their username. I have also created a group called family, and given the group read/write permissions on all the documents. The folder containing all the documents is shared via samba.

    I have other Ubuntu gutsy machines setup with the samba share mounted as described in this guide using my credentials. All family members can read/write to all the documents. All sounds good so far.

    Now the problem...

    On the clients, all documents show as belonging to me in gnome. This in itself doesn't matter that much because of the group permission thing. The problem start when someone else tries to create a new file or folder and then edit it. It appears on the client machine as mine and given the default permission of drwxr-xr-x. This means the user who just created it, can't edit it!!!!

    Interestingly, when I do an ls -l on the client machines, the ownership of the files show as the correct users.

    I see two way around this:

    1) is there a way to change the default permissions when creating a file/folder?

    2) somehow getting the correct ownerships to appear


    Any help much appreciated

    Phil

  8. #38
    Join Date
    Aug 2005
    Location
    Rio de Janeiro, Brasil
    Beans
    92

    Post Re: [HOW TO] Mounting smbfs Shares Permanently

    Hi folks,

    just to add two parameters that are useful on a daily use:

    1) to those who have special characters on filename and directories, you can use:

    iocharset=utf8

    2) How to setup the mount be read/write to the group "plugdev" - use the gid= parameter.

    Example that uses the 2 parameters:

    mount -t smbfs //192.168.0.4/Aplicacao /mnt/Aplicacao -o credentials=/home/josir/.smbpasswd,gid=plugdev,iocharset=utf8

  9. #39
    Join Date
    Feb 2008
    Beans
    48

    Re: [HOW TO] Mounting smbfs Shares Permanently

    I can mount the shares fine but I cannot write to the shared folders, The sambashare group has my user name in the group but I am not able to write to the shared resource. What am I missing?

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # / was on /dev/sda5 during installation
    UUID=19b5201a-39d3-4039-8444-d396683d05ca /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda6 during installation
    UUID=fe5a24f4-7ca9-4e4d-b3c0-34f8a3bc3416 none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    //galileoserver/us250 /home/frank/usb250 smbfs credentials=/home/frank/. smbpasswd,gid=sambashare 0 0
    
    //galileoserver/us1tb /home/frank/usb1tb smbfs credentials=/home/frank/. smbpasswd,gid=sambashare 0 0

  10. #40
    Join Date
    Feb 2008
    Beans
    48

    Re: [HOW TO] Mounting smbfs Shares Permanently

    I found the problem. I forgot to add my username
    Code:
    uid=frank,gid=sambashare
    Now I can read and write to the shared folder.

Page 4 of 5 FirstFirst ... 2345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •