How to mount/umount disk from a non-root account


 
Thread Tools Search this Thread
Operating Systems Linux How to mount/umount disk from a non-root account
# 8  
Old 03-24-2008
Quote:
Originally Posted by brendan76
I've edited the /etc/fstab and added user option

Code:
/dev/loop1              /storage/part1          auto    noauto,user,noexec 0 0

I can mount ok as user root, but ordinary user gets:

Code:
[brendan@rubidium ~]$ mount /dev/loop1 /storage/part1 -o user
mount: only root can do that

Is this a bug perhaps?

Sudo prompts for password, using Java runtime exec, this is not an option.

Setting suid bits may be the way to go if all else fails Smilie
I tryied samely. I succeed below description.

Code:
mount /dev/loop1

or
Code:
mount /strage/part1

It needs either device or directory parameter only.
'man mount' says these two examples near 'fstab' word.

but it doesn't say both parameters. It may be specification.
# 9  
Old 03-24-2008
For user mounts the user or users option needs to be put in fstab thus indicating that root approved the configuration. And the user must use only one parameter in the mount command... this is not a license to specify a different mount point. With "user" only the user who mounted (or root) can umount it later. With "users", anyone can umount.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Test cases for file system mount/umount performance in HP

Hi Folks, Could anyone please assist me with the what could be the scenarios to test the file system mount/umount performance check in HPUX. Thanks in advance, Vaishey (5 Replies)
Discussion started by: Vaishey
5 Replies

2. Fedora

What is the right way to mount and umount a usb driver?

I have some questions: 1, I successfully mounted my usb drive with "sudo mount /dev/sdb1 /mnt", but I can't wirte, It says "read-only file system". But I can write it in windows. 2, After I umounted the usb drive the led of it still on, but not blinking. Is it safe to unplug it? How to let it's... (17 Replies)
Discussion started by: vistastar
17 Replies

3. UNIX for Dummies Questions & Answers

Simple way to umount NFS mount in linux

Hello... I've mounted a share using standard nomenclature for the NFS mount command with the following command line: mount -t nfs -o rw {IP address1}:/ /mnt_for_70 / {IP address2}(rw) mnt_for_70 is a mount point I created on {IP address2} I'm confuse and want to be sure I use the... (1 Reply)
Discussion started by: blaine.miller
1 Replies

4. Cybersecurity

Remove need for sudo for mount/umount

Hello, I'm trying to remove the need to use sudo to mount (in particular, binding). Modifying /etc/sudoers using visudo, I have tried: %admin ALL=NOPASSWD: /usr/bin/mount %admin ALL=NOPASSWD: /usr/bin/umountand %admin ALL=(ALL) NOPASSWD: /usr/bin/mount %admin ALL=(ALL) NOPASSWD:... (5 Replies)
Discussion started by: Narnie
5 Replies

5. Solaris

mount & umount in sigle-user mode

In Solaris 8, when I boot to single user mode, mount a device and then reboot or init 0, the system unmount it automatically. However, in Solaris 10 it does not seem to do the same. Here is what I did: {0} ok boot -s # format Searching for disks...done AVAILABLE DISK SELECTIONS: 0.... (11 Replies)
Discussion started by: StarSol
11 Replies

6. UNIX for Dummies Questions & Answers

How to mount disk for non-root accounts?

I have a USB disk on a little NAS controller (NSLU2 running unslung 6.8) that I can access nicely with root with mount -t cifs \\\\10.134.23.23\\DISK\ 2 /mnt/LKGD7F73A However, when I run emacs from an user mode xterm prompt, emacs cannot read and write the files on /mnt/LKGD7F73A. Emacs can... (11 Replies)
Discussion started by: siegfried
11 Replies

7. UNIX for Dummies Questions & Answers

How to mount disk for non-root accounts?

Presently I have mounted a disk as su. I believe only root can mount disks -- is this correct? I had to run mozilla in the root account so I can download the new SuSE distribution to the new disk. How can I mount the disk so non-root accounts can access the disk? Thanks, Siegfried (4 Replies)
Discussion started by: siegfried
4 Replies

8. UNIX for Dummies Questions & Answers

How do i access (mount, read & write) a floppy disk from the console, not being root?

welll, the title quite explains what i want to do thanks for your time! (4 Replies)
Discussion started by: kfaday
4 Replies

9. UNIX for Dummies Questions & Answers

solaris 8 admin I text ambiguities on mount and umount

i'm prepping for my midterm, which i will bomb. i am scurrying to finish reading the final chapter before i get down into the review. however, i came across something in chapter 8 - "mounting file systems" that has me really confused. the text says the following: then it goes on to... (2 Replies)
Discussion started by: xyyz
2 Replies

10. UNIX for Dummies Questions & Answers

Writing a script to mount and umount a drive in Linux

I have a 1 GB jazz drive. The jazz disk is used daily, both at home and at work on my Win 98 Server. So, I have to keep it in vfat format, which is fine because Linux rocks and will read it no problem. :-) However, I can't just stick the disk in the drive and open up the jazz folder in my mnt... (2 Replies)
Discussion started by: wizkid
2 Replies
Login or Register to Ask a Question