Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there a way to mount within CentOS 6.3 e.g. mount /mnt/a /mnt/b or mount /mnt/b (for /mnt/b in /etc/fstab), without the requirement of using the sudo command?

share|improve this question
    
What are you mounting? Local block storage? Network shared? –  Aaron Copley Aug 1 '12 at 14:32
    
Various network and local shares. –  Federer Aug 1 '12 at 14:49

2 Answers 2

up vote 1 down vote accepted

If you can be precise about the device to mount, and the mount point, then you can delegate that power via the user option in /etc/fstab, eg:

/dev/sdd1       /mnt            vfat    user    0 0

which will allow any user to do mount /mnt.

share|improve this answer
    
@DotGeorge, for the man page entry, man 8 mount and go down to the section on 'non-superuser mounts'. There are also options for owner and group if you want only a subset of users being able to mount the specified filesystem. –  cjc Aug 1 '12 at 14:29
    
Thanks for that, guys. I'm not sure why this didn't occur to me as I'm authenticating with a few of my shares using a credentials file. Cheers. –  Federer Aug 1 '12 at 14:33
2  
Don't forget you can use LABEL or UUID to be less precise than the block device mapping. –  Aaron Copley Aug 1 '12 at 14:33
    
@AaronCopley I've not used the UUID before. What will that give me - some level of abstraction? –  Federer Aug 1 '12 at 15:02
1  
@DotGeorge Correct, every device has a UUID. It's actually more precise than device mapping since this can change on reboot. (I misspoke a bit before.) Run the command blkid to enumerate them on your host. There is likely already an example in /etc/fstab using it. (/boot, usually.) –  Aaron Copley Aug 1 '12 at 15:07

You can add users to the fuse group to allow them to mount in userspace with fusermount.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.