Find the answer to your Linux question:
Results 1 to 5 of 5
I am trying to mount SAMBA/CIFS and it just won't work Here are my settings...please let me know what i did wrong Thanks! cat /etc/samba/smb.conf Code: [samba] comment = Samba ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2013
    Posts
    9

    Problem mounting SAMBA please help


    I am trying to mount SAMBA/CIFS and it just won't work
    Here are my settings...please let me know what i did wrong
    Thanks!


    cat /etc/samba/smb.conf
    Code:
    [samba]
    	comment = Samba
            path = /home/vm1/Desktop/samba
            writable = yes
            public = yes
    findsmb
    Code:
                                   *=DMB
                                    +=LMB
    IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION 
    ---------------------------------------------------------------------
    192.168.1.34    VM1            [MYGROUP] [Unix] [Samba 3.6.9-151.el6]

    mount -v -t cifs -o username=BUSARI,password=dadon4u //home/vm1/Desktop/samba /home/vm1/Desktop/samba-mount
    Code:
    mount.cifs kernel mount options: ip=67.63.55.3,unc=\\home\vm1,,ver=1,user=BUSARI,prefixpath=Desktop/samba,pass=********
    and then it hangs!!!

    i have to press ctrl+c to cancel it and nothing gets mounted
    now i went to dmesg

    dmesg | tail
    Code:
    ISO 9660 Extensions: Microsoft Joliet Level 3
    ISO 9660 Extensions: RRIP_1991A
    SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts
    Registering the dns_resolver key type
    Slow work thread pool: Starting up
    Slow work thread pool: Ready
    CIFS VFS: Error connecting to socket. Aborting operation
    CIFS VFS: cifs_mount failed w/return code = -512
    CIFS VFS: Error connecting to socket. Aborting operation
    CIFS VFS: cifs_mount failed w/return code = -113
    ofcourse ports for Samba and Samba Client are both turned on in system-config-firewall

    Also

    service smb status
    Code:
    smbd (pid  2039) is running...
    service nmb status
    Code:
    nmbd (pid  2031) is running...

    What am i doing wrong here?

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757
    Code:
    SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts
    Do you need SELinux ? If not just turn-off and try again

    Code:
    setenforce 0
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Just Joined!
    Join Date
    Sep 2007
    Location
    Silver Spring, MD
    Posts
    95

    Items to review

    I agree with the last person that responded to your thread, you may want to disable selinux as discussed but you also may want to review your firewall settings as well.

    Code:
    setenforce 0
    I looked at the code below and it seemed that you did not have winbindd running, that could help you with the binding process, I have found that this works seamlessly with windows servers. Also, ensure you have a user with the same username and password as the windows account.

    But the process to install winbind would be as follows:
    Code:
    yum install samba-winbind-clients -y #If it is linux
    apt-get install samba-winbind-clients -y # if debian
    Review iptables to see if they are running
    Code:
    iptables -L -n --line-numbers | grep -i 139
    If it is, then you need to see if port 135-139 is allowed, if it is not then you could add an entry to allow the ports, since I am not familiar with your network, I will just use some generic items

    Code:
    input = iptables -L INPUT | awk '/INPUT/ { print $2 }'
    iptables -I $input 1 -p tcp -m state --state NEW,RELATED,ESTABLISHED -m multiport --dport 135:139 -s 192.168.0.0/16 -d 192.168.0.0/16 -j ACCEPT
    I think you should be good to go from this point.

    If you still have trouble, run nmap scan against the machine to ensure the ports 135-139 are available. If they are run wireshark to see if there is something blocking the ports. Also, check on your machine to ensure the file sharing is enabled and 56 bit encryption is turned on, the 128 bit encryption may not be supported using this version of samba (I have included a file for your review).

    Todd
    Attached Images Attached Images

  4. #4
    Just Joined!
    Join Date
    Jun 2004
    Location
    North Hollywood, CA
    Posts
    22
    You also need to have samba users for each login. The easiest way for that is smbpasswd -a username. The -a adds a user. The username does have to be an existing user in the system /etc/passwd file. I mount samba shares on my desktop through fstab. From a command line you should just need to mount -t cifs -o username=login passwd=password workgroup=workgroup //server/share /localmountpoint . I think that's all right as far as the options (-o). Using fstab you should make a credentials file that is only root readable with those fields in it and point the mount line to the file like /localmountpoint //server/share cifs credentials=credential_file 0 0. Otherwise you have to put the username, password and workgroup in the fstab file which is a bit of a security issue.

  5. #5
    Just Joined!
    Join Date
    Sep 2007
    Location
    Silver Spring, MD
    Posts
    95

    Other options

    @Larry,

    Good points.

    I think I had mentioned in my previous post that you need to have the username and password match but not using the smbpasswd -a <username>, good catch.

    One thing, do you have a active directory environment or do you use users from /etc/passwd.

    I agree with the last respondent, if you have a username and password that has been added to samba or if you have the ability to synchronize the smbpasswd with unix passwords (I like to use webmin to keep things in order), then this process will help when you change the password for a particular user and it does not change in samba, it will ask you for a password.

    1. Be sure to add the user to samba (smbpasswd -a <user>)
    2. Sync the passwords with your account (use webmin to help)
    3. Add a line to fstab (you don't need to add user credentials)
    4. On question, are you running active directory at all or is this for a personal project?

    I have just installed samba, configured a few shares, ensured the username and password was correct, it seems to be working fine.

    Todd

Posting Permissions

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