LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-14-2004, 11:41 AM   #1
adamsjw2
Member
 
Registered: Jan 2003
Distribution: Mandrake 9 & SuSE 81.
Posts: 40

Rep: Reputation: 15
Help with fstab entry to connect to network share


Greeting all,
I have the following in my fstab so that I can mount a shared directory on a Netmax Linux file server:

//netmax/application /mnt/netmax smbfs auto,gid=users,username=jadams,password=abcd123 0 0

I can copy files FROM the server, but I can't write to it. I thought gid=users would fix this but it didn't. I also entered -o rw, into the entry and that didn't help either. I'm sure this is simply a syntax problem, resulting from my limited knowledge.

Any help would be greatly appreciated and any tweaks to make this file more stable would be accepted with excitement and many thanks :+)

TIA
Jim Adams
 
Old 02-14-2004, 12:52 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 453

Rep: Reputation: 32
Clarification: you have a server running Linux sharing a directory over a network using Samba.

Is the directory read only on the server? What is the result of this command on the server?
ls -l path_to_directory
If the directory is read only, you cannot create new entries or delete entries in the directory. There are good reasons for making the directory readonly, such as preserving its contents.
 
Old 02-14-2004, 02:00 PM   #3
adamsjw2
Member
 
Registered: Jan 2003
Distribution: Mandrake 9 & SuSE 81.
Posts: 40

Original Poster
Rep: Reputation: 15
RobertP,
Thanks for your quick and courteous response. Yes I have write privileges on the server. If I log into my Linux desktop as root and I can read and write. It's my regular user account that has the problem. As usual, I don't want to work from Root unless it's a must.
Jim
 
Old 02-14-2004, 06:11 PM   #4
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 453

Rep: Reputation: 32
What are the privileges on the directory? If you cannot write to it as a user, you will not be able to write to it over the network.
ls -l shareddirectory
 
Old 02-14-2004, 07:41 PM   #5
adamsjw2
Member
 
Registered: Jan 2003
Distribution: Mandrake 9 & SuSE 81.
Posts: 40

Original Poster
Rep: Reputation: 15
RobertP,
The username & password setup in the fstab entry are the same as the setup on the Linux Netmax server. Doesn't this take precedence over the local user name and password on my linux desktop, which isn't setup on the server? I think it should as the username root and the password I use to log onto my linux box isn't setup on the server either.
Jim
 
Old 02-15-2004, 11:43 AM   #6
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 453

Rep: Reputation: 32
Quote:
Originally posted by adamsjw2
RobertP,
The username & password setup in the fstab entry are the same as the setup on the Linux Netmax server. Doesn't this take precedence over the local user name and password on my linux desktop, which isn't setup on the server? I think it should as the username root and the password I use to log onto my linux box isn't setup on the server either.
Jim
One or both of us are confused. Giving a username and password does not allow you to override permissions on the server unless you are root. If you are adding the same line to the /etc/fstab on a Linux desktop machine as used in a Linux server, a different machine, the Linux server still uses the permissions on its own filesystem, that are revealed by the command ls -l issued on the server. The /etc/fstab can add additional restrictions to remote users such as readonly, but cannot give write access to a readonly file. A remote user cannot or should not be able to override those file permissions, unless he connects by ssh and issues commands as root. That is a major part of Linux's security. What do you see when you issue the ls -l command on the server? Are you not authorized to access the server?

If you want to give anyone on your network write access to a directory, that directory must have write permission for the owner or others as set by chmod under root.
 
Old 02-15-2004, 12:24 PM   #7
adamsjw2
Member
 
Registered: Jan 2003
Distribution: Mandrake 9 & SuSE 81.
Posts: 40

Original Poster
Rep: Reputation: 15
RobertP,
Thanks for your helpful comments. I think we're talking past each other. You write:

]One or both of us are confused. Giving a username and password does not allow you to override permissions on the server unless you are root. If you are adding the same line to the /etc/fstab on a Linux desktop machine as used in a Linux server, a different machine, the Linux server still uses the permissions on its own filesystem,

Here are my questions for my own education:

1) How does being root on my linux desktop override the permissions on the server in a way that the regular user account does not? Neither of these, regular user or root, has an account on the server to which I'm trying to connect. I thought, and possibly incorrectly, that when you add to the mount line in the fstab a username & password that corresponds to a username and password that has write permissions on the server, that would work. FYI, The user name and password that I use in the fstab, is the username and password of the administrator of the Linux server, which happens to also be me.

So, do I understand correctly that the Linux server doesn't use the entries in the fstab, but uses either the username of the person logged onto the linux desktop or the computer name of the linux desktop, or neither?

Sorry for my think-headedness on this and your patience in helping me understand. When I get back to work tomorrow I'll run ls-l on the server and double-check the permissions.

Jim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/etc/fstab entry ryedunn Linux - Newbie 1 01-17-2005 02:45 AM
Automount network smb share with fstab phatboyz Linux - Networking 2 11-03-2004 01:05 PM
NTFS FSTAB Entry Campy19 Mandriva 2 11-02-2004 08:37 PM
FC2 FSTAB Entry jeopardyracing Linux - Networking 6 06-27-2004 07:57 PM
fstab entry albean Linux - Newbie 1 12-04-2002 02:33 PM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration