Mount samba share on boot

Hello,
I want to mount a samba share on boot.
I have put this in /etc/fstab
//linuxbak/mp3 /mnt/mp3 smbfs username=***,password=***,user 0 0
But the network daemon is started after /etc/fstab is executed.
And I was wondering if it possible to change this somewhere.
Or maybe an other idea to mount the samba share on boot time

maybe an automounter would help you?  http://www.google.com/search?q=autofs&s … 8&oe=utf-8

Similar Messages

  • Mounting samba share starts avahi, ssh and sftp at client

    The problem is at the client. When i mount a samba share (with # mount), avahi is started, which starts ssh and sftp. This is wrong on many levels.
    Not sure how long this has been going on, someone else already asked this on stackexchange on 11.2.15, but didn't get any answers.
    Journal output immediatly after mounting (hostname, ip etc. removed):
    Mär 18 01:35:51 hostname dbus[434]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
    Mär 18 01:35:51 hostname systemd[1]: Cannot add dependency job for unit boot.automount, ignoring: Unit boot.automount is masked.
    Mär 18 01:35:51 hostname systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    Mär 18 01:35:51 hostname systemd[1]: Starting Avahi mDNS/DNS-SD Stack Activation Socket.
    Mär 18 01:35:51 hostname systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Found user 'avahi' (UID 84) and group 'avahi' (GID 84).
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Successfully dropped root privileges.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: avahi-daemon 0.6.31 starting up.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
    Mär 18 01:35:51 hostname dbus[434]: [system] Successfully activated service 'org.freedesktop.Avahi'
    Mär 18 01:35:51 hostname systemd[1]: Started Avahi mDNS/DNS-SD Stack.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Successfully called chroot().
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Successfully dropped remaining capabilities.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Loading service file /services/sftp-ssh.service.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Loading service file /services/ssh.service.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Joining mDNS multicast group on interface enp1234.IPv4 with address myip.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: New relevant interface enp1234.IPv4 for mDNS.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Network interface enumeration completed.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Registering new address record for myip on enp1234.IPv4.
    Mär 18 01:35:51 hostname avahi-daemon[2583]: Registering HINFO record with values 'X86_64'/'LINUX'.
    Mär 18 01:35:52 hostname avahi-daemon[2583]: Server startup complete. Host name is hostname.local. Local service cookie is 123.
    Mär 18 01:35:53 hostname avahi-daemon[2583]: Service "hostname" (/services/ssh.service) successfully established.
    Mär 18 01:35:53 hostname avahi-daemon[2583]: Service "hostname" (/services/sftp-ssh.service) successfully established.

    Thanks for your answer.
    snakeroot wrote:Are you sure it is actually starting ssh and ssftp or is it just having avahi advertise them as existing?
    I'm not sure if anything is started, the term "Service ssh successfully established" sounds like the ssh serrver is started to me, but it might just be strange wording. What does "advertise as existing" mean?
    From the snippet you quoted, it looks like the latter. Unless you have alread started socket activation for ssh or sftp, whether via systemd *.socket or inetd, I'm not sure it would actually be started.
    I didn't enable anything manually.
    I think you can rm/mv the sftp-ssh.service and ssh.service files /etc/avahi/services/ and prevent those services from being advertised.
    OK thanks for the hint. Nontheless i would rather stop avahi from starting than configuring it.
    Begin rant...
    I'm a bit annoyed that avahi is starting without my permission. Seems like systemd is getting a bit overzealous with starting services. Interestingly this was one of the big problems with upstart, and was supposed to be solved with systemd. I still like systemd.

  • [SOLVED] Suddenly unable to mount samba share using cifs

    I have a home server running ArchLinux, hosting an SMB share. My client box is also ArchLinux, both are up to date, running Linux-ck 3.9.2-2-ck. Prior to rebooting both machines around twenty minutes ago, the share mounted fine for months.
    Here is the extent of the "verbosity" I receive from mount:
    mount error(13): Permission denied
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    Here is my fstab:
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    # UUID=71066ae2-40ec-4125-9db7-d04b6a04f712
    UUID=71066ae2-40ec-4125-9db7-d04b6a04f712 / ext4 rw,relatime,data=ordered 0 2
    # UUID=172faa6a-9cca-4d9e-a0b9-a5da3ea81922
    UUID=172faa6a-9cca-4d9e-a0b9-a5da3ea81922 /boot ext2 rw,relatime 0 2
    # UUID=65023815-33fc-4ebd-b245-65683201fbcf
    UUID=65023815-33fc-4ebd-b245-65683201fbcf /home ext4 rw,relatime,data=ordered 0 2
    UUID=1a23d461-fa2b-4ea4-8e58-e7efba3f3bed /media/Storage ext3 rw 0 2
    //ARRAY/Array /media/Array cifs credentials=/home/xaero/.smbpasswd,iocharset=utf8,uid=1000,gid=1000,nounix,sec=ntlm 0 0
    I have tried any number of different options on that final line defining this share now:
    I have tried //array/array (which is what it was originally) and //ARRAY/Array (which is case-sensitive) as well as any combination of using my credentials file (which used to work) or user=,pass= as well changing my credentials file to use quotation marks around my password as it has special characters. I've also read of using sec=ntlm fixing mount issues, but in my case it did not. I'm kind of scratching my head here as passing --verbose to mount yields zero additional information... the uid and gid entries were necessary in the past to mount this share, however I have tried both with and without them, to no avail.
    I rely on SMB in lieu of sshfs as there isn't a stable sshfs implementation for Windows users, which there are some on my network; I also find for whatever reason SMB happens to be faster.
    Last edited by Xaero252 (2013-05-19 21:45:30)

    I'm not exactly sure what fixed this... I looked at the configuration file to make sure I hadn't missed it being updated, and it was in the new format; everything setup correctly (I remember having to edit it not long ago to fix something, probably for the update which you mentioned) I reverted my fstab back to the way it was before (making backups is good) and restarted the smbd on the server numerous times... at some point it just started working again. I wish I had a more concrete answer for documentation sake, but I was literally just rebooting/restarting services in desperation with little to no config hacking between and suddenly things clicked. I'm also no longer running the sec=ntlm option..
    Thanks for reminding me to check my config though, when I updated I had forgotten to enable user restriction (guest was enabled, and certain directories weren't user-specific)

  • Unable to mount samba share file for xbox 360

    I want to be able to stream music from a directory in my arch linux computer (xfce4) to my xbox using samba on a local network using ethernet cables and a router not connected to the internet. I've been able to get samba to startup and I see the folder "share" in my network tab in thunar, but I am currentlly unable to mount that folder. I haven't been able to get the xbox to recognize my arch computer or visa versa.
    Here is the configuration I am running as of now:
    #======================= Global Settings =====================================
    [global]
    # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = XBOX
    # server string is the equivalent of the NT Description field
    server string = "Samba Server"
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = user
    [share]
    comment = music for xbox
    path = /home/ricky/Music
    browsable = yes
    guest ok = yes
    read only = yes
    create mask = 0777
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    I did a chmod -r 777 on the ~/Music directory already and I still haven't been able to mount it. I have read in the wiki that creating a /mnt/xboxshare directory, for example, would actually mount the share directory and allow the xbox to share. However, I would rather just use the directory I specified instead of creating another directory. Has anyone else experienced this problem or have any advice for me?
    Here is some additional information:
    I do have to input a password when I issue this command
    $ smbclient -L \\RG_ARCH
    Enter password:
    Domain=[XBOX] OS=[Unix] Server=[Samba 3.6.8]
    Sharename Type Comment
    share Disk music for xbox
    IPC$ IPC IPC Service ("Samba Server")
    rg Disk Home Directories
    Domain=[XBOX] OS=[Unix] Server=[Samba 3.6.8]
    Server Comment
    RG_ARCH Samba Server
    Workgroup Master
    XBOX RG_ARCH

    I was wondering whether it had anything to do with the network I was using. The router I am using can't access the internet and I am using the basic 192.168.1.X setup with 255.255.255.0 as the mask.
    My computer has an ip of 192.168.1.2 and the xbox has an ip of 192.168.1.3. However, I am still unable to ping the xbox or even see it show up in the network. I did notice that whenever I am using another router that is connected to the internet, I can see other windows based computers in the network tab in thunar under "windows network"
    Also, I do have a username and password associated with the samba setup.. so I assume maybe that has something do with it. I checked the permissions of the share folder and it was root:root with read and write permissions. I know samba is working fairly well.. but for whatever reason I can't get the xbox to connect even while it is on the same local network.

  • 10.4.3 not mounting Samba shares

    I am having problems connetcting to the SMB Shares on out server. The Server is running Fedora 4 and Samba 3.0.14 I have attached the server logs to show what is happening when I try to connect. Basically I cannot connect to the server or browse the server since it says that I am already connected to the share but the share shows up no where. I cannot also unmount the share or eject it if it decides to show up. I have completely re installed 10.4 and ran the updates via downloads not the software updater. I am not having any other connectivity issues such as email or internet access.
    Any help would be great thanks.
    Server Logs:
    [2005/11/21 10:49:00, 1] smbd/service.c:makeconnectionsnum(648)
    quicksilver-500 (192.168.0.130) connect to service design initially as user production (uid=500, gid=500) (pid 28394)
    [2005/11/21 10:49:00, 3] smbd/secctx.c:set_secctx(288)
    setting sec ctx (0, 0) - secctx_stackndx = 0
    [2005/11/21 10:49:00, 3] smbd/reply.c:replytcon_andX(456)
    tconX service=DESIGN
    [2005/11/21 10:49:00, 3] smbd/process.c:process_smb(1091)
    Transaction 4 of length 39
    [2005/11/21 10:49:00, 3] smbd/process.c:switch_message(886)
    switch message SMBtdis (pid 28394) conn 0x96d8520
    [2005/11/21 10:49:00, 3] smbd/secctx.c:set_secctx(288)
    setting sec ctx (0, 0) - secctx_stackndx = 0
    [2005/11/21 10:49:00, 3] smbd/secctx.c:set_secctx(288)
    setting sec ctx (0, 0) - secctx_stackndx = 0
    [2005/11/21 10:49:00, 1] smbd/service.c:close_cnum(836)
    quicksilver-500 (192.168.0.130) closed connection to service design
    [2005/11/21 10:49:00, 3] smbd/connection.c:yield_connection(69)
    Yielding connection to design
    [2005/11/21 10:49:00, 3] smbd/secctx.c:set_secctx(288)
    setting sec ctx (0, 0) - secctx_stackndx = 0
    [2005/11/21 10:49:00, 3] smbd/process.c:process_smb(1091)
    Transaction 5 of length 43
    [2005/11/21 10:49:00, 3] smbd/process.c:switch_message(886)
    switch message SMBulogoffX (pid 28394) conn 0x0
    [2005/11/21 10:49:00, 3] smbd/secctx.c:set_secctx(288)
    setting sec ctx (0, 0) - secctx_stackndx = 0
    [2005/11/21 10:49:00, 3] smbd/reply.c:reply_ulogoffX(1249)
    ulogoffX vuid=100
    [2005/11/21 10:49:00, 3] smbd/process.c:timeout_processing(1336)
    timeout_processing: End of file from client (client has disconnected).

    What do you mean 'upgraded Fedora'?
    What part?
    (I have a similar problem)

  • User unable to umount samba share

    Here is the lines in my /etc/fstab related to samba shares.
    # Some Windows/SAMBA shares
    //BAO-QNAP500GB/USB\040Disk\0401 /mnt/eBooks smbfs workgroup=BAO-HOME,username=xxxxxx,ip=192.168.2.4,password=xxxxxx,noauto,noatime,user,rw 0 0
    I am able to mount samba share as a user (not root) after
    chmod u+s /usr/bin/smbmnt
    chmod u+s /usr/bin/smbumount
    by
    mount /mnt/eBooks
    However, I am unable to umount as a user:
    [ning@HP-m8100y ~]$ umount /mnt/eBooks
    umount: /mnt/eBooks mount disagrees with the fstab
    On the other hand, this could work:
    smbumount /mnt/eBooks
    Can somone tell me what I did wrong?

    Looks like its something to do with fstab though I don't know what never having mounted shares though fstab myself. I would try removing the fstab entry and just using smbmount to mount shares, thats the way I've always done it and never have problems with mounting/unmounting.
    smbmount //IP Address/source folder /destination folder

  • Can't connect to samba share via VPN

    Hello all,
    I am looking for an answer for few days now and still can't manage to fix it. I found two workarounds in the meantime, but it's not what I want!
    My case:
    Cisco vpn on one side and Mac vpn client (native). I can connect alright, can't only mount samba share. Via console I got invalid argument error, but when I go to finder > go to server it's just processing (no error). Left it for few mintes and nothing happened. I have a windows on virtual machine and I can mount samba alright. One more thing. I created a new user, logged in and it works! ****.
    Can anyone say where should I look? What can be the problem on my old account? Don't want to switch and change all the things now, there must be a way to fix it...
    Hope someone can help
    Thanks in advance,
    Regards,
    Jake

    Hi Richard,
    Thanks for interest. It's a windows share 2003 smb. It's a company network. As I said its not the case of VPN itself.
    About the new user, that's a yes, it's same username as my samba share name, but even tho it's the same it needs my authentication. For the more, when I am with my mac at work and connect via cable I can access everything alright from my old account.
    How can VPN block me when I can access it from my windows virtual (which is not the same as my work username). I can access it from new user, I would say its not the case of VPN blocking me there, I guess it's something I have changed over the years with my previous VPN settings.
    I have direct access to VPN and I know firewall is off right now as we are testing it, so its for sure my mac settings...
    Question is where do I find it:)

  • After update to 10.6.3 copy to a Samba share fails

    I have just upgraded to 10.6.3. Since then whenever I copy a file from my iMac to a Samba share on a Linux server I get the error:
    The operation can't be completed because you don't have permission to access some of the items.
    No changes were made on the server before this update.
    If I create a file using any program or create/delete a folder on the share works fine, but I cannot copy files. The error occurs at the end of the copy, not a the beginning....
    Anyone has had this problem? My best guess is something is not right with this latest patch.

    Hi,
    I have noticed the error occurs when I copy files from my Mac to any samba server (I run OpenSuSE on a Phenom-X4 and Ubuntu PPC on an old iBook-G3). However when I copy to a file share on a PC running Windows Server 2003 I do not get any file copy problems.
    Reading and executing files from mounted samba shares or windows shares did not seem to have any issues.
    For the moment I have relegated myself to copying files to a Windows OS running on a virtual machine in my Phenom-X4 and then logging into the VM and copying the files a second time to the samba share but I would appreciate anyone posting further on this issue. Because of my experiences I believe the issue is an incompatibility with the Samba servers after upgrading to 10.6.3.

  • Yosemite 10.10.1: Finder/CIFS mount problem: wrong folder count/folders not shown @samba shares

    Hello to all,
    we have several MacBook Pro (15" MBP Retina 2012/13"MBP Retina 2014) running. After upgrading to Yosemite 10.10.1 we had one nightmare after the other.
    Most problems could be solved with 3rd party software upgrades but there are several problems with the operating system itselve which can not really  be called a professional productive system at the moment...
    Ok., one thing after the other...here is one of our biggest problems:
    After upgrading from Mavericks or Mountain Lion to Yosemite 10.10.1 the CIFS/SMB mounts to our samba 3.x servers, running on Ubuntu Linux LTS 12.04 makes trouble. We could mount the server shares but after browsing with the Finder the beach ball occures and the Finder hangs forever. Sometimes we could not refresh the Finder, killing the process ended in a complete hang-up of the system which ended in a switch off death blow. This is not amusing because we have 30Tb of customer data there, which has to be worked out.
    We heard about the SMB3 protocol which will be used per default in Yosemite and so we decided after some testings to upgrate our Ubuntu servers to the latest LSF 14.04. release with samba 4.1.6 installed. There was no message from Apple for this SMB protocol release upgrade, never heard something related to Yosemite (Why?).
    Ok, after these server upgrades and disabling most of the Spotlight functions the performance to the CIFS shares was a little bit better as before but now we have another problem with the Finder...if you browse to the shares there are folders missing which have lots of files in it. For example there is a folder with 60 subfolders and 3562 files on the first level in it, the Finder shows 220 files and 15 folders. The Terminal shows a different count with "find . -maxdepth 1 -type d | wc -l" or "find . -maxdepth 1 -type f | wc -l" but there is also a difference to the original file and folder count. It doesn`t matter if the clients are connected via WiFi or Gigabit Ethernet. We have no access problems. We have the same behavior if we set the files and folders to 0777 permissions on the servers. The deletion of the preferences files of the users on the MacBooks does not solve the problem. If we use the "Go To Folder" option and type the path to a folder which is not shown in the Finder you get an result or not. But it is also possible that the result is not correct and there are also still files or subfolders missing.
    In my opinion this is a timeout problem and a "special SMB3 protocol interpretation" which is buggy. We have one hint found in /var/log/system.log:
    "Jan 23 14:35:49 wsosx33.clients.getcom.de KernelEventAgent[69]: tid 54485244 type 'smbfs', mounted on '/Volumes/customersdata2015', from '//x144067:@srvlxp013.servers.getcom.de/customersdata2015', not responding"
    We had no problems with Mavericks at all, we still have no problems with Windows 7 Pro/Ultimate, Windows 2008R2 (native or virtual) or Linux Mint 17/17.1 clients, neither with samba 3.x nor with our actual environment and different newer samba releases.
    We believe that this is a big bug in Yosemite, but we cannot go back to Mavericks because of incompatible TimeCapsule backups. Our workarround at the moment is that we have installed Linux Mint on our MacBooks to get 80% of our daily jobs done, rest has to be done with Windows 7 installed over virtualbox @Linux.
    We have no clue at the moment how to solve this problem, the samba logs do not give any hint. The access from other operating systems is perfect and very fast, but not with Yosemite. We checked different tips found in the internet but nothing helped.
    Does anybody has another idea to get Yosemite working or should we keep Linux Mint until Apple will provide a CIFS/SMB patch and going on with our workaround solution, which is productive at the moment ??? Our staff is not amused and wants one solution and not this workaround with two operating system. We have to decide wether we wait until Apple will get this fixed or we have to switch to Microsoft Windows (which is a No Go for me, but I will not be asked...).
    Thanks in advance
    C.

    Hi William,
    thank you for your response.
    As you can read in my post I talked about CIFS/SMB.
    It makes no difference if we mount the share over CIFS or SMB.
    Folders with lots of files will not be shown even if we use SMB3 or an older protocol.
    As mentioned I believe this is a timeout problem.
    Does anybody know how the CIFS/SMB timeout setting in Yosemite could be changed?
    Kind regards
    C.

  • How to allow users to mount a Samba shares on a WXP

    Through lots of reading I've managed to get an understanding of how to mount SMB shares at bootup by placing the proper edits in /etc/fstab. While having the shares of the server, running Contribs.org SME Server 6.01 (recently known as Mitel SME Server) and acting as a samba server, being mounted at startup is perfect since the server is always on. This is not the best idea for the XP workstation since it isn't always on. Here is a copy of my present fstab file with x's replacing the passwords.
    fstab               [B---]  0 L:[  1+19  20/ 21] *(1085/1086b)= .  10 0x0A
    # /etc/fstab: static file system information
    # <file system>        <dir>         <type>    <options>          <dump> <pass>
    none                   /proc         proc      defaults            0      0
    none                   /dev/pts      devpts    defaults            0      0
    none                   /dev/shm      tmpfs     defaults            0      0
    tmpfs                  /tmp          tmpfs     defaults            0      0
    sysfs                  /sys          sysfs     defaults            0      0
    usbdevfs               /proc/bus/usb usbdevfs  defaults            0      0
    /dev/cdroms/cdrom0     /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
    /dev/cdroms/cdrom0     /mnt/dvd  udf       ro,user,noauto,unhide   0      0
    /dev/floppy/0          /mnt/fl   vfat      user,noauto,unhide      0      0
    //192.168.2.2/stuff    /mnt/silicon2 smbfs username=kingnubian,password=xxxxxxx,user
    //192.168.2.105/e-smith   /mnt/silicon1 smbfs username=kingnubian,password=xxxxxxx,users,noauto
    /dev/discs/disc0/part5 swap swap defaults 0 0
    /dev/discs/disc0/part1 / xfs defaults 0 1
    I would like users with an account on the Linux box to mount the remote share on the XP box without needing to SU and consequently need the root password. When trying now to mount "e-smith" (The share on the XP box) as a user using "mount /mnt/silicon1" I get a message about needing to be SU.

    To allow users to mount smb shares you need to make smbmnt suid:
    # chmod +s /usr/bin/smbmnt
    Note however that the user needs to own the directory used as mountpoint. So I don't know how to make 'mount /mnt/silicon1' in your setup work for all users.
    For the users to be able to unmount the smb shares as well you need:
    # chmod +s /usr/bin/smbumount
    Now users can do 'smbmount //server/share mountpoint -o username=whatever' or simply 'mount mountpoint' if the details are specified in fstab. To unmount root can do 'umount mountpoint' or users can do 'smbumount mountpoint'.
    Don't confuse smbmount with smbmnt - the first is the command you use to mount shares manually, the second is the one that should be suid and is used both by smbmount and by mount -t smb.
    Hope this helps.
    -bogomipz

  • [SOLVED] advanced shell script for mount and unmount samba share

    Good morning guys,
    Today I've a very long question....
    Hope in your help....:
    I usually move from different network.
    For one of those I need to mount some share that are under an ActiveDirectory server.
    To do that I use samba.
    Especially I've made and use the below  shell script.
    I know that it's so stupid but I'm a very newbie:
    #!/bin/sh
    echo "This is a custom script for mount my citrix share"
    echo "Please insert user password (must a sudoer user)"
    echo " "
    sudo mount -t cifs -o username='myusername',password='mypassword' //host_ip/TsHome$/myusername /home/myuser/samba_share/TsHOME
    sudo mount -t cifs -o username='myusername',password='mypassword' "//host_ip/direction" /home/myuser/samba_share/direction
    echo " "
    read -p "Press ENTER key to close this terminal"
    exit
    As I say the script work but it's so crude...!
    I want/need to implement it whit the follow addictions:
    1. print a feedback on mount: somenthing like "TsHOME is now mounted" or "unable to mount TsHOME"
    2. check if the share are already mounted: to prevent accidentally multiple mount. If a share is already mounted I want to print something like "TsHOME is already mounted on /home/myuser/samba_share/TsHOME"
    3. ask for share password  (now it's in clear on script) - This is optinal
    4. un-mount the share before reboot or shutdown command. That because I've notice that If i reboot or shutdown without manually un-mount the share the step of unmounting network file system became very slow
    If it's no extremely difficult, can someone help me to write this script?
    I know that man exist but I'm not a programmer and it's so difficult for me approch it.
    Thank you in advance.
    Ale
    Last edited by Alexbit (2010-09-23 21:29:13)

    Thank you very (VERY) much!
    I've follow your information and.. it work!
    If can be usefull to other this is the complete script:
    #!/bin/sh
    echo "This is a custom script for mount citrix share"
    echo "****************************************"
    echo " "
    echo "Please insert domain password:"
    read -s mypassword
    echo " "
    echo "|checking mount state...in share are not mounted mount it!|"
    echo "+-------------------------------------------------------------------------+"
    if grep "TsHome" /etc/mtab &>/dev/null; then
    grep "TsHome" /etc/mtab | awk '{print "TsHome is already mounted on " $2}'
    else
    sudo mount -t cifs -o username='yourusername',password="$mypassword" //ipaddress/TsHome$ /home/Samba_share/TsHOME && echo "TsHOME is now mounted" || echo "unable to mount TsHOME"
    fi
    echo " "
    if grep "direction" /etc/mtab &>/dev/null; then
    grep "direction" /etc/mtab | awk '{print "direction is already mounted on " $2}'
    else
    sudo mount -t cifs -o username='yourusername',password="$mypassword" '//ipaddress/direction' /home/Samba_share/direction' && echo "direction pat is now mounted" || echo "unable to mount direction"
    fi
    echo " "
    if grep "Area" /etc/mtab &>/dev/null; then
    grep "Area" /etc/mtab | awk '{print "Area is already mounted on " $2}'
    else
    sudo mount -t cifs -o username='yourusername',password="$mypassword" '//ipaddress/Area' /home/Samba_share/Area && echo "Area is now mounted" || echo "unable to mount Area"
    fi
    echo " "
    echo "All DONE!"
    echo " "
    read -p "Press ENTER key to close this terminal"
    exit
    I don't really well understand what I've to put in rc.local.shutdown....
    I think somethings like:
    #!/bin/bash
    # /etc/rc.local.shutdown: Local shutdown script.
    echo "This is a custom script for UN-mount citrix share"
    echo "********************************************"
    echo " "
    echo "|check mount state: if mount then un-mount!|"
    echo "+-------------------------------------------------------+"
    echo " "
    if grep "TsHome" /etc/mtab &>/dev/null; then
    grep "TsHome" /etc/mtab | awk '{print "TsHome is NOT mounted -> going on..." $2}'
    else
    sudo umount /home/Samba_share/TsHOME && echo "TsHOME is now UN mounted" || echo "unable to UN-mount TsHOME"
    fi
    echo " "
    if grep "direction" /etc/mtab &>/dev/null; then
    grep "direction" /etc/mtab | awk '{print "direction is NOT mounted -> going on.." $2}'
    else
    sudo umount /home/Samba_share/direction && echo "direction is now UN mounted" || echo "unable to UN-mount direction pat"
    fi
    echo " "
    if grep "Area" /etc/mtab &>/dev/null; then
    grep "Area" /etc/mtab | awk '{print "Area is NOT mounted - Finished" $2}'
    else
    sudo umount /home/Samba_share/Area && echo "Area is now UN mounted" || echo "unable to UN-mount Area"
    fi
    echo " "
    echo "going shutdown"
    echo " "
    sleep 5
    I've try but it seems to ignore the IF statement... this is the output when ALL share are UNmounted:
    $ sh /etc/rc.local.shutdown
    This is a custom script for UN-mount citrix share
    |check mount state: if mount then un-mount!|
    +-------------------------------------------------------+
    umount: /home/Samba_share/TsHOME: not mounted
    unable to UN-mount TsHOME
    umount: /home/Samba_share/direction: not mounted
    unable to UN-mount direction
    umount: /home/Samba_share/Area: not mounted
    unable to UN-mount Area
    going shutdown
    Tomorrow I will test again when I'm at office.
    Meanwhile can you check if I made a macroscopic mistakes?
    Thank you again!
    Last edited by Alexbit (2010-09-23 17:34:49)

  • What can I do to stop high network usage when a Samba share is mounted?

    Ok, so i've done a lot of googling on this, but i've not really found any conclusive answers.
    Basically, when I mount a samba share from another machine, Lion goes crazy. I can see from iStat menus that network (wireless) usage varies wildly from 300KB/s, right up to 6/7 MB/s, but my cpu usage doesn't spike at all. When this is happening the laptop is almost unusable, clicking something can take 30 seconds for a response. I'm presuming that this is something to do with Spotlight trying to index the share, but as it's several terabytes in size, it never completes. I've left the laptop on overnight in the hope that whatever process is causing this would finish, but to no avail. I've also placed the share in the Privacy tab in Spotlight's preferences, and used mdutil -i to stop it accessing the volume, but with no luck.
    Can anyone help? It's driving me nuts and it means i can't access my files without having to ftp in instead.
    I'm running 10.7.3

    Unfortunately, your description of the problem and the placement of both your main and AirPort Express routers does lend itself to believe the problem is most likely Wi-Fi interference. If it isn't the microwave or portable phones, it could be obstacles like walls between the routers that may be preventing the stream from consistently reaching the Express.
    In your configuration, the stream will first travel to the main router, and then, from the main router to the AirPort Express. If, for example, you started the stream in the same room as the Express, that stream would have to travel across several rooms at least twice.

  • Samba mounting windows share

    Hi, I'm trying to mount a windows share but all I can do after mounting is seeing the folders and files on the share. I can not read any file, I get "permission denied". On windows everything should be set to allow for the files to be read (if my brother didn't forget, overlooked anything). I even disabled the windows firewall.
    The windows 2000 computer can access the arch linux samba shares without a problem.
    I'm running arch current up to date.
    Here's how I mount, as root:
    mount -t smbfs -o username=gast,password=gast //192.168.0.132/Muziek /mnt/LW/Muziek/
    (gets mounted succesfully, but I can't read the files)
    Here's my /etc/samba/smb.conf:
    #Global Parameters
    [global]
    workgroup = THUIS
    netbios name = gel
    passdb backend = smbpasswd
    force create mode = 0770
    force directory mode = 0770
    wins support = yes
    case sensitive = no
    encrypt passwords = yes
    security = share
    server string = Linux                 
    [share]
    path = /mnt/hda1
    public = yes
    only guest = yes
    writable = no
    printable = no
    create mask = 777
    Can anyone help me out? I've been trying to get it working for at least a few hours :s.

    You are right. I did not need the dir_mode and file_mode, and I did have full control enable, but no dice.
    However it seems there is a folder aliasing feature, that was introduced in windows vista (though I don't recall the windows name for the feature and I am running win7), I believe to be the problem. For example, if I share and mount  C:\Users I have access to C:\Users\myuser and can create folders and documents there. However the predefined folders Music, Documents, Pictures I have no write permission inside of.
    Next if I share and mount C:\Users\myuser I have the same result for those folders however now I can see additional folders  one is 'My Documents' in this folder I have write access and changes are mapped back to the Documents Folder. Additionally there are now showing in the Documents folder, I had no write access to, additional folders which also weren't showing before 'My Music', 'My Pictures', and 'My Videos' in which I now have write access and they map back as well.
    When I connected to the shares from an XP machine I could simply access the original folders.

  • Suspend fails when samba shares are mounted

    I have a weird problem with my laptop when I try to suspend to ram.
    If no samba share is mounted, then it suspends OK.
    If there is a samba share mounted, when I suspend through KDE menu or by the command "pm-suspend", then it fails to suspend, and in /var/log/pm-suspend I see the line "s2ram_do: Device or resource busy". If I type the command " s2ram -f" then it suspends OK.
    I have created a hook that executes "umount -a -t cifs" and now it suspends, but only if the samba share is available. If it is an unavailable it still fails to suspend.
    Does anyone has the same problem or a solution to this?
    P.S. I hope I posted in the correct category...

    Hi nanawel, i've a very similar problem to your on my home machine: this (https://bbs.archlinux.org/viewtopic.php?pid=1196319) is the thread i found when researching my problem, so i started investigating it and then discovered the samba shares problem, so i found out your problem when looking up for similar annoyances in Google.
    Have you been able to track it down?
    As i said in the other thread, i don't have installed any of those gnome-shell extensions, but i have the TweakTool->Desktop option named "Show mounted volumes on the desktop" enabled, as well as an entry in my /etc/fstab file: tomorrow i'm going to have some tries with my brother's pc and see if i can find out something more.. i'll keep posting on this thread then, since it looks like my problem is very very similar.. hopefully we'll be able to track it down this beast.
    But also, I'm also experiencing that "slow network share/choppy desktop" on my work machine only: it looked like a FUSE issue, but could never debug that since i've a quite important deadline at work and can't start debugging my OS during working hours
    Anatolik was kind enough to chime in and suggest to debug it (https://bbs.archlinux.org/viewtopic.php … 7#p1193437), this is the thread about it.

  • AutoFS + Samba share problems when share not online (especially in itunes)

    I'm trying to look into having some or all of my media on a server for a couple of my macs, the main one of interest right now being a mac mini working as a HTPC under a tv, being operated 99% of the time with just the apple remote and frontrow.
    A friend informed me that if you have your itunes library not managed and add files from a remote share then everything works pretty well. Namely if you try to play a file it will seemingly automount the remote file and start it playing. If the remote server is not available it will quickly discover this and after a short pause start giving explanation marks next to the broken tracks. Get the remote destination connected and then try to play a broken track and it will successfully mount the track and play.
    Basically perfect.
    I quickly tried accessing these files via a symbolic link or alias to them on the remote drive, in doing this i can be somewhat insulated from problems of trying to move the library to other machines/shares in the future. This all works fine but you do lose the ability for itunes to automatically mount the remote drive, which is a bit of a step back, but not a big deal on my normal machine. On my HTPC machine however i'd really like front row to be able to just work, hence automatically mounting the server as required.
    The only problem was that when i tried with files directly added to the itunes library from a remote location frontrow would NOT automount the tracks/videos when you attempted to play them like itunes would do.
    I've just spent the last few hours following the advice here
    http://rajeev.name/blog/2007/11/22/autofs-goodness-in-apples-leopard-105-part-i/
    to setup autofs in the hope that this would let me get auto mounting working as it does with itunes and directly added to the library remote files.
    I boiled this down to the following settings
    as root
    vi /etc/auto_master
    and add
    /smb auto_smb
    then create this new config file
    vi /etc/auto_smb
    and add
    <Mount dir under /smb folder> -fstype=smbfs ://<share user>:<share pass>@<ip address>/<share point>
    ie.
    testMount -fstype=smbfs ://netuser:[email protected]/remoteMount
    finally tell automount to throw away its cache
    automount -vc
    then the mount should be setup
    df -h
    shows the indirect map waiting
    map auto_smb 0Bi 0Bi 0Bi 100% /smb
    and by triggering it
    ls /smb/testMount
    you should connect and get a listing, a subsequent df shows
    df -h
    //[email protected]/Media 466Gi 325Gi 141Gi 70% /smb/Media
    Everything worked well with the share getting mounted nicely when present, frontrow could just start playing the files it needed, perfect!!
    The problem came when i wanted to simulate the media server being offline, basically frontrow, a lot of the system including finder, cd commands attempting to access the share, and itunes if you tried that would all freeze for long periods of time as they tried their best to get the files they were looking for.
    I tried looking into getting this to gracefully time out and think i got somewhere by trying to setup the samba share to be soft linked.. I wasn't sure in what files i could add this to, first attempts didn't seem to do anything but adding this seemed to make a difference
    /etc/nsmb.conf
    containing something like
    #Configuration file for example.com
    [default]
    minauth=ntlmv2
    streams=yes
    soft=yes
    to turn soft samba shares on. Things like cd in a terminal seemed to behave quite well with this, when no remote share present you would get empty folders and the like. Finder would also seem to be reasonable with it.
    Frustratingly itunes and frontrow both still have quite massive pauses even when finder and cds in the background show that perhaps the soft links are working and failing like they should.
    I'm now left wondering what i can do to fix it, and resorting to perhaps having the files added via a symbolic link, using the login items to launch the remote share every boot and then having it so that all i need to do is reboot the HTPC mac mini if the server is on for it to pick it up and let me play the files. Otherwise they'll just be unavailable and will fail gracefully without locking up itunes. The perfect solution would be to either have a crontab running, or some applescript bound somehow to whenever frontrow is ran which manually tries to tell finder to do the equivelant mount the login items setup does.
    It's frustrating though as its so close, and the autofs solution if it did work better would seem to be the perfect solution. Has anyone dabbled with this and got any suggestions as to options you can setup to make things not go horribly wrong when a remote share is NOT present, preferrably within the context of itunes or front row not complaining, but to be honest any suggestions i'll be able to try out myself.
    Sorry i've written so much, perhaps some of it will be helpful reference as it took me a while to decipher that link at the top into just setting up a samba autofs.
    Cheers.

    It seems like it's not only the ArchLinux workstation that displays the norwegian letters wrong. The only machine that shows this correc is the machine that created the file/catalogue.
    It seems like the windows 2000 displays the cataloge created by windows XP just fine.

Maybe you are looking for

  • Mac pro no longer connects to web via internet sharing

    My Mac Pro does not have an airport card so I have often used a PowerBook G4 or MacBook Pro to share a wireless internet connection via ethernet. A few months ago this method began failing but I was able to share a connection via firewire. Now I am n

  • How to set List and Tree Binding Value manually from backing bean?

    Dear All, I somehow found this code to work so that I could set a value on my bindings from a managed bean.   public void setBindingExpressionValue(String expression, Object value)     FacesContext facesContext = getFacesContext();     Application ap

  • AirPort Express, only one device connected at a time.

         I was setting up my uncles Airport Express yesterdy and got everything set up and the wifi signal broadcasting properly. It was then time to set up his iPad. I used a windows computer to set up the iPad and everything was going fine. After the i

  • How to fetch mpg file from content repository

    Hi All, I have uploaded a mpg(video) file in content repositoy. But I am not able to fetch it and display it using embed tag. is anybody aware of a right method to do the same? Thanks in advance.

  • Ise and switch authentication and privilege level

    Hi Guys, I'm working on an eval on vmware. I have got everything working for wlan authentication and I'm working on shell authentication for switches. On the ACS you have the possibility to give the user privilege level on the switch. You can do this