LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-17-2005, 03:35 PM   #1
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Rep: Reputation: 23
root samba share...


Hi

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

And here's my smbusers.map file...

# Unix_name = SMB_name1 SMB_name2 ...
root = benbradley
#nobody = guest pcguest smbguest
#batfastad = 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.

Thanks in advance guys

Ben
 
Old 01-17-2005, 03:42 PM   #2
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Original Poster
Rep: Reputation: 23
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.

Any ideas?

Thanks

Ben
 
Old 04-27-2005, 10:36 PM   #3
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
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.

Last edited by houler; 04-27-2005 at 10:52 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
SAMBA not share in FC4 unless logged as root mbruffey Linux - Software 1 10-06-2005 02:31 PM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 08:23 AM
Simple Samba Setup, Share & Not Share timmywo Linux - Software 4 07-30-2004 07:27 AM
root access from W2K to SAMBA share slintz Linux - Software 1 06-03-2003 02:00 AM

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

All times are GMT -5. The time now is 10:56 PM.

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