• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Part Samba, Part Mount*fixed*

flippinfleck

Golden Member
So here's what I'm looking to do...

I've got a large hard drive with lots of mp3's on it. I want to be able to add to this collection from one computer to another using Samba.

I'm using RH 7.1 w/Samba, and all is working well so far. Only problem is, when the drive (fat32) is mounted as per my /etc/fstab it becomes -rwxr-xr-x That's not what I want! I want to be able to log in as my normal user on Win2k (already have the smbpasswd file set up) and copy mp3's to this drive. That's not possible unless my Win2k username is root with the root password. Even though I have encrypted passwords, I don't want to do this.

What am I missing? I've read all the relevant man pages, read all the faq's, all the how-to's and guides.

Everything else works fine. I can peruse the files on the drive over the network, I can add to my home directory (on the linux drive) just fine. But I cannot add to the mounted drive.

Grrrr!
 


<<

What am I missing? I've read all the relevant man pages, read all the faq's, all the how-to's and guides.
>>



You must create a new user on your RedHat system with the same username as your windows machine. Let's say "bob."

I'm assuming you can figure out how to use 'useradd', or redhat's fancy schmancy user & group menus. So you add a regular user "bob" to your linux system.
Than you go to a shell prompt and as root, type "smbpasswd -c bob", and proceed to set a password for that user over SMB.

than you set ownership of the mp3 directory to bob.
(replace /mp3 with wherever your files are)

"chown -R bob /mp3"

Now, user bob should have read and write privileges, and hence samba, logged in as user bob, also will.

You might want to do a "/etc/init.d/smb restart" to make sure everything's hunkey-dorey.

Good luck
 
Since FAT doesn't support users and rights like full fledged Linux filesystems the kernel emulates them, by default root owns all the files and only he can write to them. To change this you need to pass the uid and/or gid parameter so a different person/group own the files.

First unmount the partition, then remount it with 'mount -t vfat -o uid=user's id number /dev/whatever /mnt/wherever'
Find out the users id with with the 'id' command.
If that works to your liking, edit /etc/fstab and change the part where it says 'default's to have 'uid=user's id number'.

That should set it up to remount it correctly on reboot.
 
The users are not the problems, all users are the same between the boxes.


<< Since FAT doesn't support users and rights like full fledged Linux filesystems the kernel emulates them, by default root owns all the files and only he can write to them. To change this you need to pass the uid and/or gid parameter so a different person/group own the files >>


I think this is what I'm missing. Gonna go and give it a shot now...


>edit adding uid=xxx,gid=xxx to the fstab did the trick, thanks edit<
 
Back
Top