DebianThis forum is for the discussion of Debian Linux.
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.
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.
and in the process, i prevented standard users from being able to do mount
$ mount /media/cdrom0
mount: must be superuser to use mount
the pertinant line in /etc/fstab is
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
i tried
$ su -c "chmod u+s /bin/mount"
which now allows me to mount, but when i try to unmount, i get
$ mount /media/cdrom0
$ umount /media/cdrom0
umount: /dev/hdc: not mounted
umount: /media/cdrom0: must be superuser to umount
umount: /dev/hdc: not mounted
umount: /media/cdrom0: must be superuser to umount
thanks, changing permissions for umount works. i am very concerned that i am opening potential security vulnerabilities. the +s means enable the suid bit, right?
ps. the reason you couldn't umount it as user is because you
mounted it as root.
I don't think so... 'cause his prompt was a "$" and not a "#" which proves that it was executed as user... unless he changed the default root prompt behavior
Sorry, I should have put that a little clearer, and it has nothing to do with the prompt in this case
as the suid bit had been set on mount, but not on umount.
ie. the device is mounted by root.
as the suid bit had been set on mount, but not on umount.
ie. the device is mounted by root.
OK
but we could also think that umount is a symlink to mount (that what I thought before checking it was not that and so umount have to also set suid) like modprobe for insmod...
and if you just read mount man page, you see that you just have to add "user" option to mount/umount a partition with the same user... so that may lead to a certain confusion
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.