LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2005, 12:57 AM   #1
C0Y0TE
LQ Newbie
 
Registered: Oct 2004
Location: Eugene, OR, USA
Distribution: Slack 10.0, RH 9
Posts: 29

Rep: Reputation: 15
Lightbulb USB Stick Mount Solution (and Problem) With Linux


So I finally learned how to get my USB memory key to work in linux, for other newbies, it's easier than you might think!

mount -t vfat /dev/sda1 /target-foldername-here

You must specify the filesystem of the key to allow linux to use it, but this will allow both reading and writing to the drive..

So, I made a script named "stick" to enter the mount command and echo success or failure, which works fine, except for one problem.

What I can't deduce though, is how to use this command when not in root... Other accounts get a message that they are not allowed to use mount...

What am I overlooking to allow universal usage of this script/command? I'm only working on my home workstation, so I'm not worried about security problems, just trying to learn what the problem is, and fix it.

Anyone know what this mount problem means, and how to fix it, aside from giving the other account root privilege?
 
Old 01-16-2005, 01:44 AM   #2
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
Hi C0Y0TE,

Goggle or seach on these forums on sudo.

-Kristijan
 
Old 01-16-2005, 01:59 AM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Another solution would be to ass a line to your fstab:
Code:
/dev/sda1      /media/pendrive  vfat     noauto,rw,user          0     0
noauto - do not try to mount the device at startup
rw - mount the device as read/write
user - allow non-root users to mount the device (making them the effective owner of the device)

After adding that line, your mount command does not need to be as verbose. A simple "mount /dev/sda1" or "mount /media/pendrive" will work, because mount can get the missing pieces from the /etc/fstab line.
 
Old 01-16-2005, 02:37 AM   #4
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

why is necessary to use "vfat" as filesystem? i would suggest "auto". if you have something in the card considering MSWindows stuff and you get problems to mount, then you should try changing to "vfat".

regards

slackie1000
 
Old 01-16-2005, 02:50 AM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Quote:
Originally posted by slackie1000
why is necessary to use "vfat" as filesystem? i would suggest "auto".
Using "auto" is best when the media you are using has a tendency to change (for instance, floppy disks can be vfat, ext2, or whatever) and when the system doesn't have a problem detecting what type of filesystem it is.

Unfortunately, in this case, C0Y0TE already mentioned in the original post that specifying the filesystem was required for the mount command to work. I can also say that I have a similar problem. Even though vfat support is compiled into the kernel (i.e. not a module), I still must specify the filesystem when trying to mount my USB stick. If auto works on someone else's system, then I'd suggest keeping it that way. However, the filesystem is not likely to change on the stick. So there's no loss in leaving it as vfat.
 
Old 01-16-2005, 11:24 AM   #6
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

ok! clear now, Dark_Helmet!
i misunderstood the first post. i thought he was not happy with the fact that it is necessary the filesystem specification.
my bad.

regards

slackie1000
 
Old 01-17-2005, 03:02 PM   #7
C0Y0TE
LQ Newbie
 
Registered: Oct 2004
Location: Eugene, OR, USA
Distribution: Slack 10.0, RH 9
Posts: 29

Original Poster
Rep: Reputation: 15
Right on, thanks for the varied responses!

The literal "vfat" filetype specificiation may not necessarily be required, it was a universal solution we worked up for the people in my Linux OS class (who have any number of brands of USB stick, and EVERY one of them worked with this solution.)

I'll get to trying out the fstab thing, that sounds like the best solution in the long run, and definutely need to look up sudo as well, as I am not entirely sure what it is, although it looks like its similar the su, or at least based on it..? (correction, I looke dup sudo, I guess it would work, but I'd rather allow all users access to the mount comman universally, nstead of adding one at a time to a special list..)

Thanks again, now if only peple would answer my triple-boot questions as helpfully LOL.

Last edited by C0Y0TE; 01-17-2005 at 03:05 PM.
 
  


Reply



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
USB-stick easy solution (KDE 3.4+) powadha Debian 0 09-18-2005 04:23 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
mount, Usb memory stick amer_58 Linux - Newbie 2 03-25-2005 05:44 AM
How to mount usb stick yotamk Debian 6 11-21-2004 12:46 AM
Mount my USB stick (FAT) hyllplan Linux - Hardware 3 11-05-2004 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:27 PM.

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