[Samba] Cannot write over root owned file
david rankin
drankin at cox-internet.com
Wed May 3 20:52:22 GMT 2006
From: "Larry Alkoff" <labradley at mindspring.com>
> david rankin wrote:
>> From: "Larry Alkoff" <labradley at mindspring.com>
>>>
>>> Which leads to the question, how do I act as root on a samba share?
>>> Or perhaps the question is how do I become root on the share?
>>> Is sharing as root okay or is it bad practice? Why?
>>>
>>
>> Larry, in your smb.conf, try this:
>>
>> valid users = you
>> force user = root
>> force group = root
>> admin users = you
>>
>> I believe if you just set admin users = whoever, that will force the user
>> and group to root by default. It has been a while since I played with
>> this, but I still use it and it works...
>
> I'm a little hesitant to access a share with full root access all the
> time. Do you consider this safe?
>
Yes, it's safe as long and you don't go wild hitting the [del] key in a
willie-nillie fashion. What I usually do that masks this from all users
except me is to create the user shares say:
/home/samba/office
/home/samba/forms
/home/samba/jointcase
Then for my use I include an additional share for my use only which give me
root access to all share data; and that also hides the share from all users.
YMMV, but it works for me.
[samba]
comment = Base Samba Share
path = /home/samba
valid users = david
force user = david
force group = ochiltree
admin users = david
browseable = no
writeable = Yes
inherit permissions = yes
> What I've worked out is to mount tillie in my smbmt script with the line:
> smbmount //tillie/all /mnt/tillie
> which picks up the $USER.
> So if I run the script as $USER=root I'm root, otherwise a user even
> though my $UID=0 when I su to run the script and smbmount.
>
> I wish there was some way to "su" into a share but haven't seen it yet.
>
Well for me, its fire up PuTTy; www.chiark.greenend.org.uk/~sgtatham/putty/
ssh server, log in as me,
su
and you are in.
>> Aside: Next time you are at the Salt Lick in Driftwood, don't forget to
>> order the blueberry cobbler and vanilla ice cream desert. Yes, after the
>> family style all you can eat, it will hurt, but it is worth it...
>
> Ahh, Salt Lick. I live close by, off Camp Ben Macoulough Rd about two
> miles from Hwy 290 West so I've been there more times than is good for me
> <g>
>
> Come to town some town and I'll treat you. I'm in the book.
>
You are on! Both grand parents lived in Austin. 1807 Pearl, and the other in
Jonestown on lake Travis. Ahh the days, the hike-n-bike, the lake, chasing
squirrels with bb guns in Pease Park, Barton Springs (before it was
topless), Town Lake.....
--
David C. Rankin, J.D., P.E.
RANKIN LAW FIRM, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
(936) 715-9333
(936) 715-9339 fax
www.rankinlawfirm.com
--
More information about the samba
mailing list