LinuxQuestions.org
Help answer threads with 0 replies.
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 11-26-2005, 09:34 AM   #16
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0

Check out your log files :

- dmesg
- /var/log/messages

There you should find what went wrong
 
Old 11-26-2005, 09:58 AM   #17
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by kolonell
Check out your log files :

- dmesg
- /var/log/messages

There you should find what went wrong
Thanks, this is what I found:
Code:
[root@laptop log]# cat messages | grep jdhd
Nov 26 13:32:05 laptop mount: Could not resolve mount point ~/jdhd
Which actually sounds quite logical to me if the mounting proces from fstab starts before I login, because if that's the case, then there is no user-homedirectory (so no ~). Do you know if the mounting proces from fstab start before or after loging in. To me it seems that is done before loging in. If that is the case, then there is no way to automaticaly mount the share to the homedir of the user that logs in using fstab.
 
Old 11-26-2005, 11:21 AM   #18
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
The ~ refers to the home of the user currently used so it points to /root/jdhd (services are started with root user) but not finding the directory

try using the full path of your home directory (/home/'username'/jdhd) instead of the ~
 
Old 11-26-2005, 11:45 AM   #19
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
I fixed it! By doing a little debugging I reached the same conclusion as the above post. The system was looking for /root/jdhd and offcourse didn't find this. Besides that there was another error in the fstab, I didn't need to include "auto" in the line, because al the lines in fstab are mounted automatically except for the lines which contain "noauto". Here is the working fstab line:
Code:
//ephyra.jesdesign.nl/jdhd /home/jethro/jdhd smbfs user,username=jethro,password=xxxx 0 0
I now want to modify it all so that the jdhd-share only get's mounted when the user "jethro" logs in. So I figure I have to put something like 'mount -t smbfs //ephyra.jesdesign.nl/jdhd ~/jdhd' in .bashrc or something. The problem is that I'm not allowd to run the 'mount -t' command unless I'm root. Is there a way out of this? Besides that I have to figure out a way to pass the username and password using the mount command.
 
Old 11-26-2005, 02:33 PM   #20
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
I think you need NFS for that but i'm not sure ... I'll have to look in to that
 
Old 12-01-2005, 01:55 AM   #21
KPOM
LQ Newbie
 
Registered: Feb 2004
Location: Milwaukee
Distribution: Slackware 10.2, FreeBSD 5.4, LFS 6.1
Posts: 16

Rep: Reputation: 0
Quote:
I now want to modify it all so that the jdhd-share only get's mounted when the user "jethro" logs in. So I figure I have to put something like 'mount -t smbfs //ephyra.jesdesign.nl/jdhd ~/jdhd' in .bashrc or something. The problem is that I'm not allowd to run the 'mount -t' command unless I'm root. Is there a way out of this? Besides that I have to figure out a way to pass the username and password using the mount command. [/B]
I don't believe you'd need or want to tell mount the filesystem type anyhow, because it will (by default) check the mount location against fstab. This means that typing "mount //servername/sharename" will automatically mount it with the FS type and mount location found in fstab (in this case smbfs and ~/jdhd, respectively). Passing it information contrary to what's in fstab will tell it to ignore the fstab defaults, thereby making you lose any settings inside it; the important one here being the "user" string, allowing any user with credentials to mount this location.
 
Old 12-01-2005, 02:20 AM   #22
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
But I think .bashrc can't run the "mount" command for the user "Jethro" because it's not root. How can I fix that?
 
Old 12-01-2005, 02:27 AM   #23
KPOM
LQ Newbie
 
Registered: Feb 2004
Location: Milwaukee
Distribution: Slackware 10.2, FreeBSD 5.4, LFS 6.1
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by p41elvis
But I think .bashrc can't run the "mount" command for the user "Jethro" because it's not root. How can I fix that?
Log onto that user and type mount. If you get anything other than command not found, it should work.
If you do get a command not found, just change the permissions on /bin/mount to allow execution for your user, or make a sudo entry.
 
  


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
Mounting across network steve007 Linux - Newbie 4 09-08-2005 06:53 AM
network mounting steve007 Linux - Newbie 6 07-05-2005 01:37 PM
network mounting steve007 Linux - Networking 1 07-04-2005 06:24 AM
mounting across network vivekitbhu Linux - General 3 04-05-2005 04:02 PM
network mounting? doublefailure Linux - Software 1 03-02-2003 04:39 AM

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

All times are GMT -5. The time now is 10:58 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