Help required - trying to access Windows shares with Smb4k

Discussion in 'Linux' started by adam_uk, Oct 17, 2008.

  1. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    Hi

    Got the Linux Acer Aspire 8GB SD yesterday, mainly to have a play with it and to try to get to know Linux a little (I'm a Windows sys admin with no prev Linux experience...... please don't hate me) ;) . So far it's going well, love the OS!! I managed to get it running in advanced mode, install a few apps and upgrade Firefox to v3.... all without too much swearing!! :)

    Last night however I hit a bit of a brick wall trying to get the Acer to see shared drives on our Windows server. I've tried to trawl through various posts here to see if anyone had posted an idiots guide but could not see one. I've installed Smb4K which I believe will allow me to see the shared drives. Infact when loaded Smb4K see's our Active Directory domain and prompts me for a usename and password when I click on it. When I enter my login details it displays all Servers/PC and I can expand those to see the shares I need to access. All good so far........

    When I try to access a share I get the error message - The share "//ITS-SERVER/data" could not be mounted. Details smb4k_mount: Count not find submount binary.

    I'm hoping that someone out there will be able to point me in the right direction with this one!! Being a TOTAL newbie to Linux I'm stumped. I tried putting the above error intio Google but haven't found anything!! Found a few docs that seemed to suggest it might be something to do with access rights to folders but I don't really understand how all that works with Linux yet and don't really know where to look to see if that is the case here.....

    If anyone knows of a better GUI app that will allow me to access the Windows Shares other than Smb4K then I'm open to that too!!

    I'm desperately trying to resist formatting the Acer with XP or Vista but if I can't access Windows shares then I will have to. I just can't believe it can be THAT difficult...... can it?? :shock:

    Thanks :D
     
    adam_uk, Oct 17, 2008
    #1
  2. adam_uk

    scottro

    Joined:
    Aug 31, 2008
    Messages:
    347
    Likes Received:
    0
    Samba 4.x is quite new. I haven't tried it yet, but no doubt, there are some differences.
    I would think that by default, as Linpus uses F8 (Fedora 8) repositories, that it would install samba 3.

    Often with Linux (as in MS) the new things don't work properly for awhile. Again, I haven't tried Samba 4, so I don't know.

    I would try, especially if you're new to Linux, removing the samba 4 and installing samba 3. Untested in Linpus but the following should work.

    rpm -qa |grep samba

    You'll probably get something like samba-client samba-common samba with numbers after them.
    Then for each one
    sudo rpm -e <name of package with samba>
    Then
    sudo yum -y install samba (and, if it doesn't pull in the other packages you found with the first command do the same for them.)

    If you feel confident about it, rather than rpm -qa|grep samba and then rpm -e for all of them you can do
    rpm -qa|grep samba |xargs rpm -e

    That will find the packages and then send it to the xargs command. The xargs command is a handy thing that will take the output of the previous command and feed it to something else--so you're doing this
    rpm -qa (which is saying rpm, the package manager, query all packages). The grep samba means out of that output, only echo (write to the screen) the ones with samba in their name. The grep command finds things in files and gives you the line that has them.

    The | you should know from WIndows, it just pipes the output from one command to the other. So, after you've grepped the packages with samba in their name, you then feed that output to xargs, which will use rpm -e (the -e is erase) on the output. Hrrm, that was pretty tortured syntax. In other words, the result of grep samba is samba-whatever-version. So piping that to xargs rpm -e says, take the samba-whatever and run the rpm -e command on it.

    For safety, when using xargs, one can also use echo. This will tell you what it would do if you hadn't written echo. For example

    rpm -qa |grep samba |xargs echo rpm -e
    rpm -e samba-common-3.0.28-1.el5_2.1 samba-client-3.0.28-1.el5_2.1 samba-common-3.0.28-1.el5_2.1
    (Taken from a machine where I *DO NOT* want to remove samba.) :) It's just telling me what it would do, rather than actually doing it.
     
    scottro, Oct 17, 2008
    #2
  3. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    I removed v4 and installed v3 using your step guide (thanks very much for that!).

    I believe that all three parts of samba installed OK but I can't seem to find where I run the newly installed app?? Dumb question I'm sure......

    I used to access smb4k by right clicking desktop then clicking smb4k from within the other folder. However smb3k doesn;t seem to be there?? Am I missing something?
     
    adam_uk, Oct 17, 2008
    #3
  4. adam_uk

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Smb4k is not Samba 4.x. Smb4k is a KDE network browser, not related to versions of samba and has been around for eons.

    http://smb4k.berlios.de/

    Cheers.
     
    rbil, Oct 17, 2008
    #4
  5. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    OK...... :shock:

    Will re-install smb4k and see if works now samba3 has been installed
     
    adam_uk, Oct 17, 2008
    #5
  6. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    smb4k re-installed but I still get the same error "The share "//ITS-SERVER/data" could not be mounted. Details smb4k_mount: Count not find submount binary."

    HELP?!?!?
     
    adam_uk, Oct 17, 2008
    #6
  7. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    OK so now I also get the error message....

    mount error 1 = Operation not permitted
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

    Found reference to the error on the http://smb4k.berlios.de website (see below) but being a total Linux newbie I don't really know how to implement either of the suggested fixes. Can anybody help??


    <<<<<<<<<<<<<<<<<<

    There are two possible causes for this:

    You are trying to use mount.cifs(8) as normal user, but the SUID root bit is not set. The following (or a similar) command can be used as root to set the SUID bit:

    $ chmod +s `which mount.cifs`

    It has been reported that mount.cifs(8) fails if the Samba (!) server uses the "security = share" option instead of "security = user"
    Change the settings on the server.
     
    adam_uk, Oct 17, 2008
    #7
  8. adam_uk

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    scottro misled you because he didn't know what Smb4k was. He interpreted as being some version of Samba which it is not. Did you uninstall smb4k? Open a terminal and do:

    Code:
    which smb4k
    If it reports being in /usr/bin then it's still there. If not, then you need to reinstall smb4k.

    As to your problem ... I'm not familiar with that particular error message you quoted. But, smb4k needs to be run as root to be able to access any shares. You can do this by opening a terminal (if smb4k is installed) and doing:

    Code:
    sudo smb4k
    To be able to launch smb4k as sudo in the right-click menu, you'll need to edit the smb4k.desktop file. You'll find that file in: /usr/share/applications/kde

    So if you do this, you can edit the smb4k.desktop file ... in a terminal do:

    Code:
    sudo mousepad /usr/share/applications/kde/smb4k.desktop
    Look for the line:

    Code:
    Exec=smb4k
    and change it to:

    Code:
    Exec=sudo smb4k
    Save the file.

    Now when you right-click and go into Accessories and click on Smb4k you'll be running Smb4k with root privileges. An icon will appear in the panel. You should be able to mount your Windoze shares from there. Smb4k will open the share in the default KDE filemanager called Konqueror. I don't know if this gets installed when you install smb4k (as a dependency) or you need to install it independently? Probably the latter. You'll find out quick enough if you have problems with Konqueror not being installed.

    Cheers.
     
    rbil, Oct 17, 2008
    #8
  9. adam_uk

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    I should add, that although smb4k is a nice network browser, there are other ways to access your Windoze shares, so that Thunar (the Linpus filemanager) can access them directly. Here is one way ...

    In a terminal do the following (all on one line):

    Code:
    sudo mount -t cifs -o user=<Windows_Username>,workgroup=<Workgroup_Name> //192.168.x.xxx/<Windows_Share_Name> /mnt/home/mynetwork
    You'll replace those in < > with the correct input for your Windows network and of course change IP address to accomodate your particular setup. After running the above command, you'll find that Windows share in a directory called "mynetwork" in your home directory and it'll be accessible using Thunar.

    Cheers.
     
    rbil, Oct 17, 2008
    #9
  10. adam_uk

    scottro

    Joined:
    Aug 31, 2008
    Messages:
    347
    Likes Received:
    0
    I want to apologize for misleading you. I saw smb and 4 and jumped to an incorrect conclusion.

    I also want to give sincere thanks to rbll for correcting it. My only excuse is that most of my work with samba consists of setting up Linux servers for access by MS machines and that I just use the command line when I have to do the reverse.

    Speaking of that, you might try doing the mount by command line with the -v (verbose) flag and see if you get more detailed error messages.
    First, you can create a share to mount it to.

    mkdir sambatest

    Then
    sudo mount -v -t cifs -o username=john password=1234 //ITS-SERVER/data sambatest

    Explantion
    -v is verbose -t is the filesystem type, cifs which is what is used for MS shares these days. -o is options and in this case the options are username and password. (Obviously, change john and 1234 to your actual username and password. The rest is the path to the share data on ITS-SERVER to be mounted on the directory sambatest.

    Once again apologies to the OP (original poster) and thanks to rbll.
     
    scottro, Oct 17, 2008
    #10
  11. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    great thanks very very much for that. hopefully it'll work ok and i shall try over the weekend!!
     
    adam_uk, Oct 17, 2008
    #11
  12. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    smb4k works a treat thanks ever so much!!!!

    interested in getting shares visable in standard explorer but get error below when i try?? is the formatting correct???


    [user@localhost ~]$ sudo mount -t cifs -o user=user,workgroup=workgroup //10.0.99.10/Downloads /mnt/home/mynetwork

    mount error: can not change directory into mount target /mnt/home/mynetwork
     
    adam_uk, Oct 17, 2008
    #12
  13. adam_uk

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    Does the directory /mnt/home/mynetwork actually exist, and what permissions does it have if it does? The ouput of

    ls /mnt/home

    will include a line for the directory if it's there; if you haven't found out how Linux permissions are listed, post that line here and whoever sees it first will explain!
     
    daldred, Oct 17, 2008
    #13
  14. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    works a treat!!! Is there anyway I can create a batch file or login script type file that mounts shares as the laptop boots???
     
    adam_uk, Oct 18, 2008
    #14
  15. adam_uk

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Not that I know of because the last thing the system does when booting is to finally establish the network connection. What you could do is run the command using ALT-F2. This command will then remain in that program's history file, and will be available to manually run again when you need to.

    Cheers.
     
    rbil, Oct 18, 2008
    #15
  16. adam_uk

    adam_uk

    Joined:
    Oct 17, 2008
    Messages:
    12
    Likes Received:
    0
    Oh well......... Maybe Linux isn't the all singing all dancing OS after all!!!

    Thanks very much all for all your help :D
     
    adam_uk, Oct 20, 2008
    #16
  17. adam_uk

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    Linpus isn't; most Linux systems would establish networking at an earlier stage of the boot process. Linpus (presumably in order to have a desktop running quickly) leaves networking until last, so anything which relies on networking being present can't be part of the boot process.
     
    daldred, Oct 20, 2008
    #17
  18. adam_uk

    Zaraka

    Joined:
    Oct 20, 2008
    Messages:
    2
    Likes Received:
    0
    I think you can add a custom action in Thunar to mount them with a right click (like the "open terminal here"). If you have more than one share try doing a little bash script and execute it with Thunar. Edit -> Custom actions... or something like that (my install isn't english ;) )

    Agur.
     
    Zaraka, Oct 20, 2008
    #18
  19. adam_uk

    aao_user_DE

    Joined:
    Mar 6, 2009
    Messages:
    5
    Likes Received:
    0
    Hello,

    i think i have a similar problem. Using a Vista with file sharing and the linpus of aao with xfce.

    Installed smb4k and i also can see my workgroup and all shared folders. But trying do open one shared folder gives me the error 2 message or on another share folder an error-message with "wrong unc"?

    I am totally new to linux. Can anyone give me a hint?
     
    aao_user_DE, Mar 7, 2009
    #19
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.