LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-25-2009, 05:53 AM   #1
trnz$mr
Member
 
Registered: Oct 2008
Posts: 121

Rep: Reputation: 15
cannot mount usb stick


I now have a challenging delema. I'm trying to use my usb drive, so I can print my homework in the lab. I can could use it on my root account, because I can mount it automatically, but can I do that in my user account? No, of course not. I've been awake all night trying to do this, and everything I see online about this is somehow outdated, or something??? I can never get a straightfoward answer. I seriously need some help adding my user name to sudoers, or something. I don't know what else to do. Even then I don't know if it will help.
I'm using slack 12.2 on KDE (KDE's part of the problem) and my mount stick should be on sdc1. Sorry if I'm not thinking straight, I've been studying this issue for a few hours now.

Last edited by trnz$mr; 02-25-2009 at 06:01 AM. Reason: less rude
 
Old 02-25-2009, 06:05 AM   #2
bernihard
LQ Newbie
 
Registered: Feb 2009
Location: Spain
Distribution: CentOS 5.2
Posts: 13

Rep: Reputation: 2
All you have to do is add your sdc1 device to the /etc/fstab with the 'user' option. Then it allows a user to mount.

Code:
/dev/sdc1      /mount-point         fs_type     noauto,user,pamconsole        0 0
See "man fstab" for more options.
 
Old 02-25-2009, 06:15 AM   #3
trnz$mr
Member
 
Registered: Oct 2008
Posts: 121

Original Poster
Rep: Reputation: 15
Quote:
is not in the sudoers file. This incident will be reported.
This is the message I'm pretty much getting with everything. I'm honestly tyring to add myself to my own sudoers file, and I even think my root account is not in the sudoers file. I'm lost now. I think KDE is seriously to blame. If any one knows any tricks please let me know.
 
Old 02-25-2009, 06:19 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
To allow for a regular user to use automounting in KDE through HAL and dBus, all you need is make that user belong to the 'plugdev' group. Do this:
1) become root with su
2) use the 'kuser' command to add yourself to appropriate groups
* in the Users tab, double-click on your username
* in the new window, go to the groups tab
* check the 'plugdev' and, while you are at it, 'audio', 'cdrom', 'floppy' and 'video' groups and confirm with 'OK'

Alternatively, edit /etc/group accordingly.

Then you should be able to automount usb sticks. There is no need for sudo here.

If that does not work, please plug in the USB stick, wait say 20 seconds, then issue the 'dmesg|tail' command and post the output.

PS If you add your username with 'adduser' command, you are been proposed to add these groups to the user account.

Last edited by Didier Spaier; 02-25-2009 at 06:20 AM.
 
Old 02-25-2009, 06:20 AM   #5
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Add your user to the plugdev group:

# gpasswd -a username plugdev

This is all covered in the instructions. You should read them.
 
Old 02-25-2009, 06:32 AM   #6
trnz$mr
Member
 
Registered: Oct 2008
Posts: 121

Original Poster
Rep: Reputation: 15
Quote:
If that does not work, please plug in the USB stick, wait say 20 seconds, then issue the 'dmesg|tail' command and post the output.
It still didn't work so I posted the results of this command

Quote:
sd 5:0:0:0: [sdc] Mode Sense: 43 00 00 00
sd 5:0:0:0: [sdc] Assuming drive cache: write through
sd 5:0:0:0: [sdc] 7928832 512-byte hardware sectors (4060 MB)
sd 5:0:0:0: [sdc] Write Protect is off
sd 5:0:0:0: [sdc] Mode Sense: 43 00 00 00
sd 5:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
sd 5:0:0:0: [sdc] Attached SCSI removable disk
sd 5:0:0:0: Attached scsi generic sg3 type 0
usb-storage: device scan complete
Will a reboot help with this. Or would I have to do it all over again?
 
Old 02-25-2009, 06:48 AM   #7
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 had/have this same problem in Slackware and I hate KDE for some of it's issues. Not bashing Slack-but I love Gnome's ease of use regarding many things and running Ubuntu is alot easier for a newbie than Slack.
I recommend going to Ubuntu 8.04 install, goto authorizations, make sure you grant permissions to yourself on most everything-and you won't have to worry about auto-mounting-Ubuntu is very friendly to a Newbie like me and you compared to Slackware or Debian.
If your gonna stay with Slackware-download the Slackbook and have at it!
 
Old 02-25-2009, 06:57 AM   #8
trnz$mr
Member
 
Registered: Oct 2008
Posts: 121

Original Poster
Rep: Reputation: 15
Quote:
Alternatively, edit /etc/group accordingly.
Holy Cow!!! the instructions you gave me were very straight forward and it worked wonders. I couldn't find anything like this online, that was awesome. Also, I edited the /etc/group accordingly when I logged into my root account. I made sure I put my user with wheel:X:10:root,etc...., but even that didn't pass the test for my to mount my own devices.
Thanks A bunch

Quote:
Add your user to the plugdev group:

# gpasswd -a username plugdev

This is all covered in the instructions. You should read them.
thanks for giving me the command to add my username to plugdev manually. It worked as well. I just installed slack 1.5 weeks ago. Between school and this, I actually don't have the time to read all my Linux and Slackbooks, just yet. Including all the online info. But, I will get around to it. I just needed a quick fix to finish my homework assignment.
 
Old 02-25-2009, 07:02 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I am somehow surprised this does not work.

First make sure both /etc/rc.d/rc.hald and /etc/rc.d/rc.messagebus are executable (otherwise this can't work).

If you have to make one of them executable, then start it after it's done. For instance type as root '/etc/rc.d/rc.hald start'.

Then to make sure, as a regular user (not root), type the 'groups' command. You should see 'plugedv' in the output; if not, add it again.

If it's there and still auto mounting doesn't work in KDE, tell us.

Last edited by Didier Spaier; 02-25-2009 at 07:13 AM.
 
Old 02-25-2009, 07:04 AM   #10
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Yes, a reboot would help - however, if you run the command (as root) /etc/rc.d/rc.messagebus restart, that should suffice.

I'll say this now, because besides you, there's at least one other fairly new slack user who appears to be having a bit of difficulty getting things "right." And I say this without any malice, or without arrogance, and hopefully without coming off as a jerk.

Most of your issues have been covered countless times. We are all here to help, but there has been some bad advice directed towards you and others - such things as "don't worry about adding your user to all those groups when you create the user - you can do it later."

Well, guess what? Because you didn't add your user to certain groups when you created the user, you're left in a situation where you're spending hours pulling your hair out and trying umpteen different solutions to your issue, when a simple 'fix' has been staring you in the face all along.

We've all spent eons on an issue, to discover that the solution was dotting an i, or crossing a t, or adding a period, or a tick, or whatnot, but I honestly feel that you have been victimized more by a case of "too many chefs in the kitchen" than by anything else.

There are, literally, hundreds of slackware *experts* willing to help you. And a lot of your issues can be self-solved by going over the stickies in the Slackware Forum. And, a lot of your issues would be solved with one or two replies, versus the multiple, sometimes circular or conflicting replies you're getting out here in the open.

You should post most of your questions in the slackware forum, where you're more likely to get slackware-specific advice, as opposed to some of the advice you've been getting suggesting that you edit non-existent files, or install non-necessary software, etc.

I hope you understand that I'm simply trying to streamline your problem solving.

cheers,

EDIT: lol, I posted wayyyy to late for the solution in the first line of this post, but I'm leaving the post intact....

Last edited by mrclisdue; 02-25-2009 at 07:07 AM.
 
Old 02-25-2009, 07:35 AM   #11
trnz$mr
Member
 
Registered: Oct 2008
Posts: 121

Original Poster
Rep: Reputation: 15
Quote:
but I love Gnome's ease of use regarding many things
Gnome seems cool, it just didn't come with my cd installation. If I started using KDE I might as well get comfortable with it before I move on to GNOME. Otherwise, I won't learn anything. Actually I'll use Dropline next, probably next month.

Last edited by trnz$mr; 02-25-2009 at 07:50 AM.
 
Old 02-25-2009, 07:47 AM   #12
trnz$mr
Member
 
Registered: Oct 2008
Posts: 121

Original Poster
Rep: Reputation: 15
Quote:
There are, literally, hundreds of slackware *experts* willing to help you. And a lot of your issues can be self-solved by going over the stickies in the Slackware Forum. And, a lot of your issues would be solved with one or two replies, versus the multiple, sometimes circular or conflicting replies you're getting out here in the open.
Thanks, I actually feel relieved now. I will start sticking with the slackware forums, as the book said to to begin with anyways. Even if I have to wait a little longer for a reply.
 
Old 02-25-2009, 07:58 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
FYI. If you change group membership, you need to log out and log in again.

Also, if you want to mount a usb stick manually, you can use the "uid=<yourusername>,gid=<yourusername>,fmask=0117,dmask=0007" options so that it is mounted with you as the owner and with appropriate permissions. I'm assuming that the pendrive has fat32 on it. These options can be used for vfat, ntfs, ntfs-3g & cifs filesystems, which are Windows filesystems and don't save Linux permissions & acls.

Good Luck.

When my cf disk automounts, these are the permissions:
Code:
/media/disk type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)
So you can borrow these options for your pendrive:
Code:
sudo mount -t vfat /dev/sdc1 /mnt/disk -o rw,nosuid,nodev,noatime,flush,uid=<your_username>,utf8,shortname=lower
You can also create an fstab entry for that particular pendrive which would allow you to mount it as a regular user:
Code:
example:
 udevinfo -q env -n /dev/mmcblk0p1
the program '/bin/bash' called 'udevinfo', it should use 'udevadm info <options>', this will stop working in a future release
ID_NAME=SD01G
ID_SERIAL=0x97834f70
ID_PATH=pci-mmc0:05d1
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT16
ID_FS_UUID=25CE-1B72
ID_FS_UUID_ENC=25CE-1B72
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=
Code:
UUID=25CE-1B72 /mnt/disk vfat noauto,user,uid=<yourusername>,rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower
The UUID number uniquely identifies the disk and allows mounting if the pendrive is assigned a different device. The noauto option will prevent booting up from failing because the pendrive isn't plugged in. The nosuid and nodev options are safety measures you should use on any non-linux filesystem, or any filesystem that other users can write to. ( You would use it to mount the /tmp partition in a multiuser situation. ) The noatime option will extend the lifetime of your pendrive by not update the access timestamp after reading a file.

Good Luck!
 
  


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
How Do mount USB stick connected to pcmcia-usb-adapter Raamisaha Linux - Newbie 3 02-11-2008 10:46 AM
Mount USB Stick tronayne Slackware 3 11-04-2007 09:41 PM
how do I mount my usb stick? Kerel2000 SUSE / openSUSE 5 12-31-2006 06:09 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
How to mount usb stick yotamk Debian 6 11-21-2004 12:46 AM

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

All times are GMT -5. The time now is 12:56 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