nixCraft Linux Forum

nixCraft

Linux 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

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-24-2006, 01:40 AM
Junior Member
User
 
Join Date: Sep 2005
Posts: 25
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
Sponsored Links
  #2 (permalink)  
Old 06-26-2006, 08:21 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Nice work. Good for all newbie out there
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Reply

Bookmarks


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 On

Similar Threads

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


All times are GMT +5.5. The time now is 03:04 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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