LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-27-2004, 04:51 PM   #1
nixinbarrie
Member
 
Registered: Apr 2004
Posts: 43

Rep: Reputation: 15
can't mount smb share as non-root user


Hello Everyone,

I am not sure why I am not able to mount a smb share anymore but if anyone could help me out I would greatly appreciate it.

I am trying to mount, as a non-root user on my linux machine to another linux box that is running samba with many shares.

Every time I try to mount I get the msg only root can do that. I am running FC1.

When I run smbclient -L hostname I can see all the shares I just can not mount anything and have tried many times now.

If anyone could help me out I would greatly appreciate it.

The reason why I am trying to do this is because I have created some dir's on my linux box that I want mounted all the time to the samba server. For the reason being I will be able to sftp over some files directly through the share instead of sftping everything to my box and then sftping everything from my box to the samba server. For example, right now it goes something like this if I want to sftp something over.

sftp to my linux box --> login to my linux box and sftp to samba share

I want to be able to
sftp to my linux box to mounted smb share.

If anyone can help me out I would greatly appreciate it.

Thanks in advance,

Take care,

Chris.
 
Old 09-27-2004, 05:43 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Make sure your user is the owner of the mount point, and make sure smbmnt is suid root.
 
Old 09-27-2004, 07:16 PM   #3
nixinbarrie
Member
 
Registered: Apr 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks for your reply as I really do appreciate it.

Yes I am the owner and smbmnt is now fixed.

However, I am unfamiliar with the syntax of smbmnt or smbmount and I have looked at the man pages and have not been able to successfully mount a remote share.

If someone could please provide me with an example I would really appreciate it.

Here is an example of what I am trying to do:

local dir = /home/user/data

Samba server hostname = filsrv01

Samba share = data

If anyone could help me out I would really appreciate it.

Thanks in advance.

Chris.
 
Old 09-27-2004, 08:00 PM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
It's easier to put the appropriate line in your fstab, so you can use 'mount directory' instead. Make sure to add the options "user" and "noauto" (noauto, because otherwise it will prompt you for a password every time you boot, holding up the boot sequence). My smb line in fstab looks like this:

Code:
//server/share   /mnt/data       smbfs           user,noauto                             0       0
 
Old 09-27-2004, 08:06 PM   #5
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Hrm, but to actually answer your question, you should be able to use

smbmount //filsrv01/data /home/user/data

if your current username is valid on filsrv01. Otherwise, add
-o username=validuser
to the end. Try replacing "filsrv01" with it's IP address if that doesn't work.
(Also, it would appear you could add "password=bla" to your fstab to avoid the prompting, but that file is usually world-readable)
 
Old 09-27-2004, 08:51 PM   #6
nixinbarrie
Member
 
Registered: Apr 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks that worked.

I appreciate all your help.

Take care,

Chris.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
mount smb drives as non-root user? cdhgee Linux - Software 5 09-05-2007 07:38 AM
Mount SMB Share from user account jeopardyracing Linux - Newbie 3 12-03-2004 05:04 PM
Cannot write to SMB share as user, can as root GT_Onizuka Linux - Networking 3 10-03-2004 06:52 PM
Cannot mount SMB share hotblack Linux - Networking 7 08-07-2003 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration