Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
11-26-2005, 09:34 AM
|
#16
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
Check out your log files :
- dmesg
- /var/log/messages
There you should find what went wrong
|
|
|
11-26-2005, 09:58 AM
|
#17
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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.
|
|
|
11-26-2005, 11:21 AM
|
#18
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
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 ~
|
|
|
11-26-2005, 11:45 AM
|
#19
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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.
|
|
|
11-26-2005, 02:33 PM
|
#20
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
I think you need NFS for that but i'm not sure ... I'll have to look in to that
|
|
|
12-01-2005, 01:55 AM
|
#21
|
LQ Newbie
Registered: Feb 2004
Location: Milwaukee
Distribution: Slackware 10.2, FreeBSD 5.4, LFS 6.1
Posts: 16
Rep:
|
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.
|
|
|
12-01-2005, 02:20 AM
|
#22
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
But I think .bashrc can't run the "mount" command for the user "Jethro" because it's not root. How can I fix that?
|
|
|
12-01-2005, 02:27 AM
|
#23
|
LQ Newbie
Registered: Feb 2004
Location: Milwaukee
Distribution: Slackware 10.2, FreeBSD 5.4, LFS 6.1
Posts: 16
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 10:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|