Samba Problem With Ubuntu Linux

Hello,

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.




rstuemkeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
wnrossConnect With a Mentor Commented:
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
/etc/samba/auth.passwd
chmod 600 /etc/samba/auth.passwd
--------CUT HERE -----------
domain=WORKGROUP
username=Administrator
password=secret
--------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.

CHeers,
-Bill
0
 
rstuemkeAuthor Commented:
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.
0
 
jar3817Commented:
In order to mount a network share...you 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.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
rstuemkeAuthor Commented:
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.
0
 
rindiCommented:
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:

smb://username@IPAddressOfServer/SharedFolderName
0
 
rstuemkeAuthor Commented:
Thank you.
0
All Courses

From novice to tech pro — start learning today.