Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to use usb drives for samba shares on my server. Having lots of problems but I feel like it's because the drives aren't mounting. This is on Centos 6.5. I just logged onto the gui and one drive popped up eventually and the other I had to mount through disk management. They both mount to /media and that's the path I'm using in my smb.conf and I can't connect to the shares but I feel like this is the problem that they are not mounted unless I log onto the server and then they auto mount after a long delay or I manually mount them. When the server is idle with no log on I imagine the drives are not mounted. Can I just edit fstab to add them?
How do I determine if the mount issue is my problem? When I mount a drive in the gui it is mounted /media/backup. I can access the drive through the gui and it's fine.
Now I am ssh into the server. I
Code:
cd /media
and then ls and I see backup listed. I can cd again to /backup but when I ls at this point I get no results. That makes me assume that the volume is not really mounted. I should be able to see the contents of the drive when I ls , correct?
I tried
Code:
mount /media/backup
and get:
Code:
[mntent]: line 6 in /etc/fstab is bad
mount: can't find /media/backup in /etc/fstab or /etc/mtab
If i try to mount the smb share on my laptop using Nautulis it gives me this prompt (see attachment). I enter my password which I set on the server by doing
Code:
smbpasswd -a ryan
when I enter the password in Natuilus , I get:
Unhandled error message: Failed to mount Windows share: Permission denied
My smb config looks like this:
[backup]
path = /media/backup
valid users = ryan
read only = No
guest ok = Yes
available = yes
browsable = yes
create mask = 0777
directory mask = 0777
The frustrating thing is I had this working before with the same drive and same settings on this server. I have since reintalled the OS to start from scratch but set everything up the same
quick update. I am using samba swat to manage the shares to make it as easy as possible. I just added myself to the admin group for the shares and I can mount the share but the folder is empty.
That leads me back to believing that the actually usb drive is not mounted properly on the server.
/dev/sdXn <-- yours will be different.
Do you know how to find that out?
Let us know!
I don't know how to find that out. I know I can browse /dev but other then that I'm not sure. I know my usb drive should show up as sdb or sdc or something like that but I'm not sure how to determine which drive is which
Plug the drive in (automount is ok if it does this)
and open terminal and type
Code:
mount | grep sd
or mount through disk management then "mount | grep sd"
show us the output.
John
When I run this command I get:
Code:
/dev/sdc1 on /boot type ext4 (rw)
I have 2 usb drives connected and I am guessing sdc1 is the internal boot drive on the computer.
When I :
Code:
lsusb
it returns:
Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 005: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp. JM20329 SATA Bridge
Bus 002 Device 006: ID 1058:0704 Western Digital Technologies, Inc. Passport External HDD
I know the last two devices are the usb drives. Can I mount them with any of that info?
would be more appropriate. it will tell you everything plugged in and its /dev/locations. if they aren't mounting automatically then /etc/fstab is the way to go. do it by uuid though, just today i restarted my computer and my flash drive and usb hdd swapped /dev locations. uuid that can't happen.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.