[Samba] Looking for a script to add/remove multiple shares from smb.conf
drew.arthur at mail.sprint.com
drew.arthur at mail.sprint.com
Tue Jul 30 06:07:02 GMT 2002
I would like to easily add/remove share entries in the smb.conf file
without removing or deleting lines that are not associated with that
section. I use SWAT for single shares.
[xxxuser]
comment = xxxuser Testing
path = /samba/xxxuser
Read Only = NO
[drew]
comment = drew's tmp share
path = /tmp
[testgroup]
path = /samba/testgroup
read only = No
So, if I wanted to remove the [drew] share I guess I would just need to
remove all lines including [drew] between the ending ] and the next
beginning [ ?
perl-o-maniacs, awklings, sedoholics.... I'll take what I can get.
Here is a script that will find the entry "unix" in a file and then
split the file. I could do something similar but I still end up with the
remaining lines after "[drew]".
#!/bin/ksh
file="file1"
while read -r xx
do
if [ "$xx" = "unix" ]
then
file="file2";
else
echo "$xx" >> $file ;
fi
done < $1
Thanks,
-----Original Message-----
From: Joel [mailto:Joel at HammersHome.com]
Sent: Tuesday, July 30, 2002 5:48 AM
To: goetz.rieger; samba
Subject: Re: [Samba] Looking for a script to add/remove multiple shares
from smb.conf
Those lesser breeds will simply have to wait their turn.
Joel
On Tue, Jul 30, 2002 at 08:57:27AM +0200, Goetz Rieger wrote:
> On Mon, 29 Jul 2002 21:27:37 -0400
> Joel Hammer <Joel at HammersHome.com> wrote:
>
> > This sounds like the sort of thing a sedoholic would find fun.
> > Why not post an example of what you want to do.
>
> And what about the even worse perl-o-maniacs? Not to mention the
awklings?
>
> ;-)
>
> Goetz
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list