LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2004, 09:14 PM   #1
poiuytrewq
Member
 
Registered: Jul 2004
Posts: 107

Rep: Reputation: 15
mount troubles


hello, i am trying to figgure out how to mount one of my hard drive partitions so that it automatically mounts durring the boot process, i have done that before using the fstab file, but then only root can write to/unmount the drive, i was hopping i could let one more user (my account, not everyone) write to the drive and unmount/remount it.
how do i do that?
[Fedora Core 1]

please help, thanks
 
Old 07-14-2004, 09:40 PM   #2
TankerKevo
Member
 
Registered: Sep 2003
Location: Tampa
Distribution: RH9 & FC2
Posts: 55

Rep: Reputation: 15
Perhaps you could create a script and place it in the rc3.d and rc5.d directories. That or make an alias and place it in /etc/bashrc then create a symbolic link inside the rc3.d and rc5.d directories to the alias.

Here is an examble of how to make scripts and alias':
http://www.linuxquestions.org/questi...hreadid=194860

The symbolic link might look like this:
Code:
ln -s /etc/bashrc/automount /etc/rc.d/rc3.d/S92automount
and
Code:
ln -s /etc/bashrc/automount /etc/rc.d/rc5.d/S92automount
 
Old 07-14-2004, 10:57 PM   #3
poiuytrewq
Member
 
Registered: Jul 2004
Posts: 107

Original Poster
Rep: Reputation: 15
what is all this rc.d stuff, have any links explaining it?

also

is there such thing as a basic login script for gnome that is mean for users to add whatever they want to that will run whenever the user logs in? what about a logout script that will automatically run on logout.
 
Old 07-15-2004, 03:14 AM   #4
TankerKevo
Member
 
Registered: Sep 2003
Location: Tampa
Distribution: RH9 & FC2
Posts: 55

Rep: Reputation: 15
rc3.d are the files/services that are run when you enter runlevel 3 (the "init 3" command). This runlevel exits the gui (if currently in runlevel 5) and brings you to a command line only mode. I use this when I am not using the gui as I like to reserve memory for my web server.

rc5.d are the files/services that are run when you enter runlevel 5 (the "init 5" command). This runlevel starts the gui interface and is the default runlevel unless you change it.

As far as login and logout scripts I have no idea how to set that up on a per user basis. But, you could probably do something using .bashrc as that is, as I understand it, based on each user. Could someone else please explain further.
 
Old 07-15-2004, 03:21 AM   #5
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Wouldn't giving the appropriate permissiens in fstab do the trick
(sth like ..... users,uid=500..... )
 
Old 07-15-2004, 12:44 PM   #6
poiuytrewq
Member
 
Registered: Jul 2004
Posts: 107

Original Poster
Rep: Reputation: 15
that allows me to mount the drive by right clicking the desktop (gnome), opening up the drives sub menu and clicking on the apropreate entry to load that drive (without root permissions), but if i try to run mount in bash(and therefore my login script), i get "only root can do this" and it wont work

[my login script is currently run through some entries i added to .profile_bash]
 
Old 07-16-2004, 05:19 AM   #7
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
in that case "su" to root and voilá...
(Must be another way though)
 
Old 07-16-2004, 05:49 AM   #8
siyeclover
Member
 
Registered: Jan 2003
Location: RaMetal
Distribution: Solaris,FC2,FreeBSD
Posts: 41

Rep: Reputation: 15
umount /mount_point
chown your_account /mount_point


siyeclover
 
Old 07-16-2004, 06:39 AM   #9
ArthurDent
Member
 
Registered: Feb 2004
Location: London
Distribution: Fedora Core 5, Mandrake 10.0, Gentoo, Suse
Posts: 179

Rep: Reputation: 30
With thanks to whoever it was who answered my similar question on this board some time ago this is the line in my fstab file that allows me to do just what you wanted. Note : All users can see the drive (a Win98 partition in my case - hence vfat) but only I (mark in this case) and root can wite to the drive...

Hope this is what you want...

Code:
/dev/hda1		/mnt/msdos		vfat	users,rw,uid=mark 0 2
obviously you change the mount-point to wherever yours is mounted, change the type if necessary and of course change the "uid=..." to your user name...

All the best

Mark
 
  


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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 11:03 AM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 12:34 PM
mount: unknown filesystem type 'ntfs' when trying to mount windows drive... DiZASTiX Linux - Hardware 12 09-28-2008 08:29 PM
troubles with SATA, troubles with NVIDIA aevangelica Linux - Hardware 6 10-17-2005 03:39 AM
Troubles with mounting hard-drive. Cannot even mount or access in root. eBopBob Linux - Hardware 4 08-19-2004 07:09 AM


All times are GMT -5. The time now is 02:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration