Samba Problem With Ubuntu Linux

Posted on 2006-04-27
Last Modified: 2012-05-05

I have installed Ubuntu Linux and want to access files on my Windows network.  Ubuntu can see the network and the shares but will not allow me to mount the share.  Gives this error:

  smbmnt must be installed suid root for direct user mounts error=1.

Did some reseach and found a fix.  Did this command:

   sudo chmod u+s /usr/bin/smbmnt

tried again and get this error:

   libsmb based programs must *NOT* setuid root

so I entered the command:

   sudo chmod  -s /usr/bin/smbmnt

tried again and am back to the original error:

   smbmnt must be installed suid root for direct user mounts error=1.

A vicious catch-22 problem.

Ubuntu does not allow a user to run as root.  How can I access my Win network shares.  Please advise.  thanks.

Question by:rstuemke

    Author Comment

    Clarify - can not log on as root in Ubuntu.

    I can see the win network.  Using the SMB4K - SMB /CIFS Share Browser.

    Latest Ubuntu with all software fixes applied.
    LVL 26

    Expert Comment

    In order to mount a network must be logged in as root.

    You can just do "su" then give the root password to get to a root shell. From there run the command to mount the share then just type "exit" to drop back to your user.

    Or you could put the mount command in some script that runs at boot so it is automatically mounted for you (since this is a home network I'm sure this wouldnt be a problem). I'm not sure exactly which file on Ubuntu, but /etc/rc.d/rc.local gets run last when booting on other distros.

    Author Comment

    I have many shares and do not want to do this for each one.  The SMB4K program is supposed to do this.
    Ubuntu does not allow login as root.    I want to let this program do it for me.  Like I think it is supposed to do.
    LVL 7

    Accepted Solution

    You could just modify fstab, something like:

    //winbox/shared  /mnt/shared smbfs username=Administrator,password=secret,uid=rstuernke,gid=users
    //winbox/pictures  /mnt/pictures smbfs username=Administrator,password=secret,uid=rstuernke,gid=users

    Alternately for security, create a file
    chmod 600 /etc/samba/auth.passwd
    --------CUT HERE -----------
    --------CUT HERE -----------

    then fstab looks like
    //winbox/shared  /mnt/shared smbfs uid=rstuernke,gid=users,credentials=/etc/samba/auth.passwd
    //winbox/pictures  /mnt/pictures smbfs uid=rstuernke,gid=users,credentials=/etc/samba/auth.passwd

    The shares will be mounted at boot time.

    LVL 87

    Expert Comment

    sudo mkdir /mnt/MountPointWhereYouWantToMountTheShareTo
    sudo mount -t cifs -o username=NameForUserOnServer //IPAddressOfServer/SharedNameOfFolder /mnt/MountPointWhereYouWantToMountTheShareTo

    or if that doesn't work you could also use your webbrowser (Konqueror works well, but Firefox won't work) and just use the following syntax in the address bar to get to the remote folders:


    Author Comment

    Thank you.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now