nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Linux Mount a USB flash or pen drive as a normal user

This is a discussion on Linux Mount a USB flash or pen drive as a normal user within the Getting started tutorials forums, part of the Linux Getting Started category; New user often gets confused with Linux security permissions. Simple mounting of a USB flash drive as a normal user ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 24-06-2006, 12:40 AM
Member
User
 
Join Date: Sep 2005
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
charvi
Default Linux Mount a USB flash or pen drive as a normal user

New user often gets confused with Linux security permissions. Simple mounting of a USB flash drive as a normal user (non-root) can be hard task.

Truth:
The mount command can be issued only as the root user.

Solution:
Give permission to normal user to mount a USB pen or flash drive.

#1: Create a directory
Code:
# mkdir /mnt/usbpen
#2: Find out USB pen drive name
Code:
# fdisk -l
Output of fdisk -l command:
Disk /dev/hdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2432 19535008+ 83 Linux
/dev/hdb2 2433 2554 979965 82 Linux swap / Solaris
/dev/hdb3 2555 6202 29302560 83 Linux
/dev/hdb4 6203 9733 28362757+ 5 Extended
/dev/hdb5 6203 9733 28362726 83 Linux

Disk /dev/sda: 256 MB, 256901120 bytes
8 heads, 62 sectors/track, 1011 cylinders
Units = cylinders of 496 * 512 = 253952 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 1011 250697 b W95 FAT32

In the above output, /dev/sda1 is my flash drive.

#3: Open /etc/fstab file
Append following line:
Code:
/dev/sda1      /mnt/usbpen      auto    noauto,user,rw,exec 0 0
#4: Save the file and login as the normal user:
Code:
$ mount /mnt/usbflash
Reply With Quote
  #2 (permalink)  
Old 26-06-2006, 07:21 PM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

Nice work. Good for all newbie out there
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
HowTo Connect 'C' with Flash in Linux sivasubramaniam Coding in General 1 01-03-2008 02:37 AM
Add normal user / FTP user usein NORMAL user(non-root) anilvrathod Shell scripting 0 07-12-2007 06:04 PM
RHEL - redhat linux pen drive mount command harshala09 Linux hardware 4 03-09-2007 07:34 PM
Ubuntu Linux firefox flash setup how to chiku Linux software 1 18-09-2006 09:07 PM
mount one partition of one linux server on other linux serve Jaggu Linux software 1 07-08-2006 10:47 PM


All times are GMT +5.5. The time now is 10:35 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38