NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mounting media as a normal user



On 27/06/2008, Super Biscuit <super_bisquit%yahoo.com@localhost> wrote:
>
> # NetBSD /etc/fstab
> # See /usr/share/examples/fstab/ for more examples.
> /dev/wd0a               /       ffs     rw               1 1
> /dev/wd0b               none    swap    sw               0 0
> # /dev/wd0e             /mnt    ???     rw,noauto                0  0
> /dev/wd0f               none    swap    sw               0 0
> /dev/wd0g               /var    ffs     rw               1 2
> /dev/wd0b               /tmp    mfs     rw,-s=1049328
> kernfs          /kern   kernfs  rw
> procfs          /proc   procfs  rw,noauto
> /dev/cd0a     /cdrom       cd9660 ro,noauto,nodev,nosuid  0  0
> /proc      /proc        procfs rw,linux 0 0
> procfs /usr/pkg/emul/linux/proc procfs rw,linux
>
>
> That's my fstab printout. Still not able to use the device as a normal 
> non-root user.
> I copied the example to etc.
>
>
> Do I use chmod 766 /dev/cd0a or something to that nature?
>
>
>
> /dev/cd0d
>
>
I think you wil still be better off with amd:

# cp /usr/share/examples/amd/amd.conf /etc
# mkdir /etc/amd
# cp /usr/share/examples/amd/cd /etc/amd
# cp /usr/share/examples/amd/net /etc/amd
(the net map is for NFS client access - /net/{host}/fs ... ; take it
out if you don't need it)
# mkdir /net /cd /amd
( /etc/amd/cd needs to be edited - by default it uses cd{0,1}a, one
needs cd{0,1}d on i386 and amd64; I personally modify it to contain
only

/devaults type:=cdfs;opts:=ro,nosuid,nodev
0 dev:=/dev/cd0d

 - I have only one CD drive)

(edit /etc/defaults/rc.conf to enable amd, rpcbind and the nfs daemons
- the latter if you have left the net map intact and expect to be
using nfs client; restart)

--- On Wed, 6/25/08, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>
> From: Chavdar Ivanov <ci4ic4%gmail.com@localhost>
> Subject: Re: mounting media as a normal user
> To: super_bisquit%yahoo.com@localhost
> Cc: "Steven M. Bellovin" <smb%cs.columbia.edu@localhost>, 
> netbsd-users%netbsd.org@localhost
> Date: Wednesday, June 25, 2008, 5:01 PM
>
>
> 2008/6/25 Super Biscuit <super_bisquit%yahoo.com@localhost>:
> > --- On Tue, 6/24/08, Steven M. Bellovin <smb%cs.columbia.edu@localhost> 
> > wrote:
> > From: Steven M.
>  Bellovin <smb%cs.columbia.edu@localhost>
> > Subject: Re: mounting media as a normal user
> > To: super_bisquit%yahoo.com@localhost
> > Cc: netbsd-users%NetBSD.org@localhost
> > Date: Tuesday, June 24, 2008, 8:06 PM
> >
> > On Tue, 24 Jun 2008 09:53:01 -0700 (PDT)
> > Super Biscuit <super_bisquit%yahoo.com@localhost> wrote:
> >
> >> I'm having a bit of trouble finding a tutorial that will allow me
> to
> >> add- as root- and mount media as a normal user. I have SmartMedia,
> >> Compact Flash, memory stick and a cd-rw/dvd drive. Any help as how to
> >> do the mounting or a link to such help would be welcome. Thanks and
> >> all.
> >>
> > See mount(8):
> >
> >     In NetBSD, a file system can only be mounted by an ordinary user
> >     who owns the point node and has access to the special device
> >     (at least read per- missions).  Also, the vfs.generic.usermount
> >     sysctl(3)
>  must be set to 1 to permit file system mounting by
> >     ordinary users, see sysctl(8).  Finally, the flags nosuid and nodev
> >     must be given for non-superuser mounts.
> >
> > The other option is to use amd.
> >
> >                --Steve Bellovin, http://www.cs.columbia.edu/~smb
> >
> > I don't see the amd.conf in my etc file.
>
> Have a look at /usr/share/examples/amd - the CD part works straight
> from there; for the rest you will have to modify the maps.
>
> > I've added nodev and nosuid to the fstab option.
> > Is there a way of changing permissions on the device to allow normal users
> access
> > to the device?
> >
>
>
>
> --
> WC Fields  - "I am free of all prejudices. I hate every one equally."
>
-- 
----------------------------------------------------------------
/dev/random says:
        I always lie. In fact, I'm lying to you right now!
----------------------------------------------------------------
Chavdar Ivanov   | Talbot Way, Small Heath Business Park
Delcam UK        | Birmingham B10 0HJ, United Kingdom
Customer Support | (+44)121-6831014
----------------------------------------------------------------


Home | Main Index | Thread Index | Old Index