Edit SAMBA share permissions from NT

Nigel Williams nigel at veritas.com
Wed Dec 12 11:33:27 GMT 2001


Yes I have it working.  There are a number of other reasons for and 'access
denied' error return.

This list is from 2.2.2
1, 	if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") ||
strequal(share_name,"global"))
	  return ERRnoaccess;

2. The share does not exist in smb.conf

3. The share is a printer share

4. The uid is not 0

5. setting info level 1, 1005

6. The share is not a disk share

7. There is no change share command script

8. The change share command script failed.

The most likely is 7.  you must provide a script which could potentially
modify smb.conf. and set the 'change share command' global parameter in
smb.conf

it is called with the following parameters

>script <config-file> <share-name> <path> <comment>

For testing I have the following simple setup.

add share command=/local/samba/scripts/sharecommand.pl
delete share command=/local/samba/scripts/sharecommand.pl
change share command=/local/samba/scripts/sharecommand.pl

with the following script.

#-----
#!/usr/local/bin/perl

system("echo
\"\[$ARGV[1]\]\\npath=$ARGV[2]\\ncomment=$ARGV[3]\\nwriteable=true\" >>
$ARGV[0]");
#-----

N.B. This is NOT what you want for a live system.

nigel


-----Original Message-----
From: Yaroslav Buga [mailto:slava_buga at yahoo.com]
Sent: Tuesday, December 11, 2001 11:57 PM
To: Nigel Williams
Cc: samba-technical at lists.samba.org
Subject: Re: Edit SAMBA share permissions from NT


Hello Nigel,

Thank you for your answer. I added an account to "admin users" and loged
onto
Win2000 with it. When I run mmc I can see all the shares on my SAMBA server
but I still can't edit their properties. I still get "Acces denied".
smbstatus  showed me that I was connected as root. And I found the same in
log. Does it work for you?

> with 2.2 the server process must be running with a uid of 0 to add/delete
> shares and change share permissions.
>
> The 'admin users' parameter can be used to designate users that will run
as
> root when connected.  Be very careful with this, everything is done as
> root.
>
> If you look at the 'runas' command in win2k help it gives an example of
how
> to start the computer management mmc as another user.
>
> You can run this mmc as your 'admin user' while logged in as yourself then
> use it to manage shares.
>
> If you add a share name of C$ or any other single letter followed by a
> dollar for that matter, this share will show up in the browse box when
> selecting a directory to associate with a new share.  Directories created
> from this dialogue below this point will however be owned by root.
>
> nigel williams
>
> -----Original Message-----
> From: samba-technical-admin at lists.samba.org
> [mailto:samba-technical-admin at lists.samba.org]On Behalf Of Yaroslav Buga
> Sent: Tuesday, December 11, 2001 7:32 AM
> To: samba-technical at lists.samba.org
> Subject: Edit SAMBA share permissions from NT
>
>
> Hi.
>
> I have a question regardless to changing share permissions from
Win2000/NT.
> When I enter the share properties, I can see the users list from my Linux
> SAMBA server . When I try to change share permissions, I get "Access
Denied
> "
> message. Is there any way to edit these permissions from NT? May be acting
> SAMBA as a PDC would help?
>
> Thanks.
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the samba-technical mailing list