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 using a version of Linux for the PS2 and I've managed to connect and mount an external USB hard drive to /mnt/usbhd1.
I now want to share this drive over my network.
Because the drive is FAT32 I can't change the permissions and they always default to root.
Is it possible for me to have a user read/write and delete files from this drive?
I'm confused about which different entries I need to make in smb.conf
The username on my laptop is benbradley, and apparently the usernames on the linux box and the laptop need to match for samba to work properly.
Is there a way to map my windows username 'benbradley' to the linux username 'root', so I can then get full access to that share?
I've tried everything over the past week to get this working.
valid users = ...
write list = ...
force group
force create mode
I've tried making the share public with guest = ok and all sorts.
There is a working samba share already which is a folder called /shared and I can read/write/delete files from that fine on the windows PC.
There seems to be so many options that seem to do similar things and I'm not sure what combination of options in smb.conf will achieve what I want.
There are two users set up in smbpasswd... batfastad and root
There are two users on my linux box - root and batfastad
The username of my laptop is benbradley.
And it logs in to a windows server 2003 domain of SAMPLE-WORKS.COM - I don't know what my workgroup is as I can only find the domain name in my windows xp pro settings
Here's my smb.conf file...
[global]
coding system = euc
client code page = 932
workgroup = NETWORK
netbios name = PS2
server string = samba %v
encrypt passwords = Yes
map to guest = Bad User
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
guest account = smbguest
os level = 1
comment = PS2
username map = /etc/smbusers.map
[shared]
path = /shared
valid users = batfastad root benbradley
browseable = yes
public = yes
writeable = yes
read only = no
guest ok = yes
[usbhd1]
path = /mnt/usbhd1
valid users = batfastad root benbradley
browseable = yes
public = yes
writeable = yes
read only = no
write list = batfastad, root, benbradley
First of all I've no idea whether it's the windows or linux username to enter in the smb.conf file.
Also I assume that no matter what access options you set in samba, that account will be limited to the permissions of individual files/folders.
Correct?
I need to somehow get root access as I can't change the permissions of /mnt/usbhd1 to anything other than root access.
Here's how I'd like to have samba set up.
2 shares.
One called shared so that everyone on my network can write/delete/read files. Preferably without a password prompt!
Another called usbhd1 that everyone can read/browse and download from, but only me as root can upload and delete files from.
How would I set that up bearing in mind only root can access /mnt/usbhd1?
Can anybody help?
I've tried everything I can think of and read through all tutorials I can find but still can't work out how to get write/delete access to /mnt/usbhd1
This is driving me insane and is costing me so much time.
Oh and the version of samba installed by default on the PS2 Linux distro is samba 2.0.10-ja-1.1
Unfortunately there's not much I can do about upgrading as not much will actually compile for the PS2 - it's a MIPS machine and I have no experience in solving compilation problems.
Here's an idea for "Another called usbhd1 that everyone can read/browse and download from, but only me as root can upload and delete files from.
":
Why don't you just create the "benbradley" on the linux box to have root priveleges?
I'm not sure if this is possible but try making the user account "benbradley" set your password, set a shell to a false one like /bin/noshell(unless you want people to login in the linux box) , and set the group for benbradley to 'root'?
This is assuming only root has write access to that directory. If it's world writeable you're going to have to set permissions accordingly.
After that then do 'smbpasswd bendbradley' to whatever you want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.