LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2011, 11:01 AM   #1
Vlad420
LQ Newbie
 
Registered: May 2009
Location: Canada
Distribution: Slackware 13.1
Posts: 17

Rep: Reputation: 0
Mount a cd image as a user


Sorry if this has been answered before somewhere else but all I have been able to find is how to add things to fstab.
Is there a way to allow a user to use the mount command without adding a specific entry to the fstab
-or-
Is there sompthing I can add to allow a user to mount anything to a specific point such as a private folder in their home directory
I am currently using slackware 13.1
 
Old 01-31-2011, 11:31 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
To mount a cd-image,.. you would:

Code:
mkdir /mnt/cdrom
mount -o loop redhat-6.iso /mnt/cdrom
 
Old 01-31-2011, 01:23 PM   #3
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
@szboardstretcher: Those commands will not let a normal user mount a loopback image. I'm pretty sure that you would have to edit /etc/sudoers for mounting images on loopback.
 
1 members found this post helpful.
Old 01-31-2011, 01:28 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,147

Rep: Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855
you need to use sudo for these two commands to work if you are not root
Code:
sudo mkdir -p /mnt/cdrom
sudo mount -o loop redhat-6.iso /mnt/cdrom
the -p switch to mkdir creates the parent directory's as well
 
0 members found this post helpful.
Old 01-31-2011, 01:29 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,089

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
If I remember well I have configured this in the past adding the user to the disk group (yes, sometimes I'm just rude )
Code:
$ ls -la /dev/loop*
brw-rw---- 1 root disk 7, 0 gen 31 08:55 /dev/loop0
brw-rw---- 1 root disk 7, 1 gen 31 08:55 /dev/loop1
brw-rw---- 1 root disk 7, 2 gen 31 08:55 /dev/loop2
brw-rw---- 1 root disk 7, 3 gen 31 08:55 /dev/loop3
brw-rw---- 1 root disk 7, 4 gen 31 08:55 /dev/loop4
brw-rw---- 1 root disk 7, 5 gen 31 08:55 /dev/loop5
brw-rw---- 1 root disk 7, 6 gen 31 08:55 /dev/loop6
brw-rw---- 1 root disk 7, 7 gen 31 08:55 /dev/loop7
but that is definetely a bad idea.

here you can find a pair of good advices

Last edited by ponce; 01-31-2011 at 02:18 PM.
 
Old 02-01-2011, 12:25 AM   #6
Vlad420
LQ Newbie
 
Registered: May 2009
Location: Canada
Distribution: Slackware 13.1
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by manwichmakesameal View Post
@szboardstretcher: Those commands will not let a normal user mount a loopback image. I'm pretty sure that you would have to edit /etc/sudoers for mounting images on loopback.
I would say thats probably my best option but wow thats gonna take a while to figure out
 
Old 02-01-2011, 06:21 AM   #7
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 322

Rep: Reputation: 59
Yes, there is, but there are good reasons for fstab, it keeps it short & safe, of course if you want to mount anything anywhere, I would suggest editing sudoers, using visudo.

Code:
$ visudo
{username} ALL = /sbin/mount, /sbin/umount
or if you don't want to type in your passwd everytime
Code:
{username} ALL = NOPASSWD: /sbin/mount, /sbin/umount
from that point you can mount anything anywhere
Code:
sudo mount ...{anything}...{anywhere}
 
1 members found this post helpful.
Old 02-02-2011, 02:59 AM   #8
Vlad420
LQ Newbie
 
Registered: May 2009
Location: Canada
Distribution: Slackware 13.1
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Nikosis View Post
Yes, there is, but there are good reasons for fstab, it keeps it short & safe, of course if you want to mount anything anywhere, I would suggest editing sudoers, using visudo.
That sounds good but just so I'm clear on this I need both the username and ALL in the line not one or the other right?
 
Old 02-02-2011, 03:04 AM   #9
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,680

Rep: Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374
a little less elegant, but you could try fuseiso.
http://slackbuilds.org/repository/13.1/system/fuseiso/
 
1 members found this post helpful.
Old 02-02-2011, 08:55 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You could also use archivemount.
 
1 members found this post helpful.
Old 02-02-2011, 09:21 AM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I use Isomaster
http://www.littlesvr.ca/isomaster/

get it from slackbuilds or sbopkg
http://slackbuilds.org/repository/13...tem/isomaster/
 
1 members found this post helpful.
Old 02-02-2011, 11:20 AM   #12
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 232Reputation: 232Reputation: 232
mountlo should work. I tried it a few weeks ago.
 
1 members found this post helpful.
Old 02-02-2011, 11:47 AM   #13
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I use pmount to mount as a normal user. There is even a Slackbuild for it.
 
1 members found this post helpful.
Old 02-02-2011, 11:51 AM   #14
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Quote:
Originally Posted by guanx View Post
mountlo should work. I tried it a few weeks ago.
...learned something new today....

cheers,
 
Old 02-03-2011, 12:16 AM   #15
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 322

Rep: Reputation: 59
Quote:
Originally Posted by Vlad420 View Post
That sounds good but just so I'm clear on this I need both the username and ALL in the line not one or the other right?
Yes, that's correct, you need both, username and ALL (ALL represents host, but you can use hostname instead).
 
1 members found this post helpful.
  


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 10:03 AM
How to mount a Windows shared directory and have mount point be owned by nonroot user Arodef Linux - Software 3 09-14-2009 12:23 AM
cp of dd image failed, better to mount image and then copy? bmcws Linux - Newbie 5 06-23-2009 06:41 PM
Permission denied error when trying to mount image contained in sshfs mount openSauce Linux - General 2 03-08-2009 08:50 AM
Mount iso image as user xavatar Debian 2 05-23-2005 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:06 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
Open Source Consulting | Domain Registration