Re: [Samba] Include directory in smb.conf

2012-02-13 Thread Santiago Diez
Hello,

Thanks Christ for your answer.
Could you explain a bit more, I have no idea what *C PreProcessing* is.

Regards
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-

http://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.pngsa=Dsntz=1usg=AFrqEzfmW2Io3OI5IqEGiVeDRebZgD4TaQ
-
*Quark Systems  CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-



On Fri, Feb 10, 2012 at 20:30, Christ Schlacta li...@aarcane.org wrote:

 On 2/10/2012 3:32, Santiago Diez wrote:

 Hi there,

 Thanks Nicol and Moray for your participation.

 Yes Nicol, I do have a particular need :
 I find it very usefull to be able to manage atomic configuration options
 adding or removing files rather than editing lines inside files.
 I use */etc/cron.d/*, */etc/sudoers.d/*, */etc/init.d/*, *
 /etc/apache/sites-enabled/* very often!

 Take *cron*, if I want to activate a job that setup time, I need to
 include

 this line in /etc/crontab
 0 0 * * * root ntpdate my_ntp_server
 But maybe I have multiple lines, maybe I want to do that automaticaly on
 multiple servers.
 If so, I'll need to setup a very techy sed command to make sure the cron
 doesn't exist already, etc...
 With cron.d, I only have to run
 echo 0 0 * * * root ntpdate my_ntp_server  /etc/cron.d/ntpdate
  If it doesn't exist, it is created, if it exist, it is updated with new
 parameters.

 Take *samba*, I manage multiple servers for many very small charity

 organization or independent workers.
 I'd be very happy to have 1 unique configuration file for all servers and
 then atomic share config files in a directory network dependant.
 Same thing that for cron, I don't want complex sed commands.
 I want to echo the configuration for *one share* into *one file*.

 If it exists, it's replaced, if it doesn't, it is created.


 Moray, your idea's good, I can probably get around by changing the script
 /etc/init.d/samba.
 Adding a simple script line that would build the config file from template
 + shares.d everytime I start the service.


 Santiago
 -
 *Santiago DIEZ*
 *Director*
 *+33 6 37 90 81 98*
 -

 http://www.google.com/url?q=**http%3A%2F%2Fsantiago.news.**
 free.fr%2Flogo.pngsa=Dsntz=**1usg=**AFrqEzfmW2Io3OI5IqEGiVeDRebZgD**
 4TaQhttp://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.pngsa=Dsntz=1usg=AFrqEzfmW2Io3OI5IqEGiVeDRebZgD4TaQ
 
 -
 *Quark Systems  CAOBA*
 *23 rue du Buisson Saint-Louis, 75010 Paris
 *-




 On Fri, Feb 10, 2012 at 11:16, Moray Henderson
 Moray.Henderson@ict-software.**org moray.hender...@ict-software.org
  wrote:

  From: Santiago Diez [mailto:santiago.d...@caoba.fr**]
 Sent: 09 February 2012 18:04

 Hi there,

 I'm wondering if there any patch or recent developement that would
 allow to
 include a directory rather than a file in smb.conf

 Something like

 includedir = /etc/samba/shares.d/

 instead of

 include = /etc/samba/shares.conf

 Thanks for your help

 We get around that by using script which builds smb.conf from a template
 and
 the contents of a config directory.  It would be nice to have the
 facility
 built in to Samba, though.


 Moray.
 To err is human; to purr, feline.





  If you can do without # Comments, you can get away with using the C
 PreProcessor to pre-process your files.
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  
 https://lists.samba.org/**mailman/options/sambahttps://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Include directory in smb.conf

2012-02-10 Thread Santiago Diez
Hi there,

Thanks Nicol and Moray for your participation.

Yes Nicol, I do have a particular need :
I find it very usefull to be able to manage atomic configuration options
adding or removing files rather than editing lines inside files.
I use */etc/cron.d/*, */etc/sudoers.d/*, */etc/init.d/*, *
/etc/apache/sites-enabled/* very often!

Take *cron*, if I want to activate a job that setup time, I need to include
this line in /etc/crontab
0 0 * * * root ntpdate my_ntp_server
But maybe I have multiple lines, maybe I want to do that automaticaly on
multiple servers.
If so, I'll need to setup a very techy sed command to make sure the cron
doesn't exist already, etc...
With cron.d, I only have to run
echo 0 0 * * * root ntpdate my_ntp_server  /etc/cron.d/ntpdate
 If it doesn't exist, it is created, if it exist, it is updated with new
parameters.

Take *samba*, I manage multiple servers for many very small charity
organization or independent workers.
I'd be very happy to have 1 unique configuration file for all servers and
then atomic share config files in a directory network dependant.
Same thing that for cron, I don't want complex sed commands.
I want to echo the configuration for *one share* into *one file*.
If it exists, it's replaced, if it doesn't, it is created.


Moray, your idea's good, I can probably get around by changing the script
/etc/init.d/samba.
Adding a simple script line that would build the config file from template
+ shares.d everytime I start the service.


Santiago
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-

http://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.pngsa=Dsntz=1usg=AFrqEzfmW2Io3OI5IqEGiVeDRebZgD4TaQ
-
*Quark Systems  CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-



On Fri, Feb 10, 2012 at 11:16, Moray Henderson 
moray.hender...@ict-software.org wrote:

  From: Santiago Diez [mailto:santiago.d...@caoba.fr]
  Sent: 09 February 2012 18:04
 
  Hi there,
 
  I'm wondering if there any patch or recent developement that would
  allow to
  include a directory rather than a file in smb.conf
 
  Something like
 
  includedir = /etc/samba/shares.d/
 
  instead of
 
  include = /etc/samba/shares.conf
 
  Thanks for your help

 We get around that by using script which builds smb.conf from a template
 and
 the contents of a config directory.  It would be nice to have the facility
 built in to Samba, though.


 Moray.
 To err is human; to purr, feline.





-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Include directory in smb.conf

2012-02-09 Thread Santiago Diez
Hi there,

I'm wondering if there any patch or recent developement that would allow to
include a directory rather than a file in smb.conf

Something like

includedir = /etc/samba/shares.d/

instead of

include = /etc/samba/shares.conf

Thanks for your help

Santiago
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-

http://www.google.com/url?q=http%3A%2F%2Fsantiago.news.free.fr%2Flogo.pngsa=Dsntz=1usg=AFrqEzfmW2Io3OI5IqEGiVeDRebZgD4TaQ
-
*Quark Systems  CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Sage Accounts Performance Issues (Solved)

2011-03-25 Thread Santiago DIEZ
Thanks Ben for taking the time to share your experience.
I'm in the list for just a couple month and this is the first time I see
that using * socket options* is a bad policy.

---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Sage Accounts Performance Issues (Solved)

2011-03-25 Thread Santiago DIEZ
As I said, I'm in the list for just a few month so I never read anything
about *socket options*.
I think it's a good thing to know that in case I bump into this parameter on
one of my servers.
Thanks again Ben.

---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*




On Fri, Mar 25, 2011 at 10:13 AM, Volker Lendecke volker.lende...@sernet.de
 wrote:

 On Fri, Mar 25, 2011 at 10:06:54AM +0100, Santiago DIEZ wrote:
  Thanks Ben for taking the time to share your experience.
  I'm in the list for just a couple month and this is the first time I see
  that using * socket options* is a bad policy.

 Question: Where did you read that it is good policy?

 Volker

 --
 SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
 phone: +49-551-37-0, fax: +49-551-37-9
 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba Windows 7 and logon scripts

2011-03-23 Thread Santiago DIEZ
Hi Dario,

Your configuration attracted my attention.
What exactly do you include in */usr/local/bin/netlogon*?

Regards
---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*




On Tue, Mar 22, 2011 at 5:20 PM, Dario Work dariow...@hotmail.com wrote:

 I had the same problem.

 I fixed it with the following in smb.conf:

 ...

 preexec = /usr/local/bin/netlogon %U
 logon drive = X:
 logon script = %U.bat
 ; logon path = \\%L\profiles\%U
 ; logon home = \\%N\%U

 ...

 [netlogon]
comment = The domain logon service
path = /home/netlogon
 ;   read only = yes
public = no
writeable = no
browsable = no

 Regards,

 Dario.

 --
 View this message in context:
 http://samba.2283325.n4.nabble.com/Samba-Windows-7-and-logon-scripts-tp2532596p3396892.html
 Sent from the Samba - General mailing list archive at Nabble.com.
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Mac OS X user having problems connecting to samba running on Ubuntu Server

2011-03-23 Thread Santiago DIEZ
Thanks for sharing your own resolution.

---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*




On Tue, Mar 22, 2011 at 10:03 PM, Amit More am...@xetus.com wrote:

 Hi all,

 Doing a bit of research on samba and hostname lead me to find the actual
 cause of the problem. If you don't specify the netbios name = 
 directive in the samba configuration(smb.conf) file, samba uses hostname
 as the netbios name (ref:
 http://www.justlinux.com/forum/archive/index.php/t-126124.html read
 cowanrl's comment) and the maximum length of a netbios name is 16
 characters. However, Microsoft limits the netbios name to 15 characters
 (ref: http://support.microsoft.com/kb/163409).

 In my case i had not specified the netbios name =  directive in
 smb.conf file and the hostname was more than 16 characters. Adding
 netbios name =  to something less than 15 characters did the trick. My
 hostname is more than 16 characters.

 Hope this helps some of you out there.

 Thanks,
 Amit More

 On Mon, 2011-03-21 at 18:16 -0700, Amit More wrote:
  Hello all,
 
  After spending some time looking into the problem, I have found out that
 changing the hostname of the machine on which samba was running to be 16(or
 less) characters long did the trick. With internalfileserver(which is 18
 characters long) as hostname Mac users were not able to connect to the share
 via connect to server(apple + k) application but could connect via the
 command line. Changing the hostname to fileserver(which is 10 characters
 long) allowed Mac users to connect to the share via connect to server
 application as well as via the command line.
 
  I am not able to figure this out. I will share it with samba users once i
 find something useful.
 
  Thanks,
  Amit More
 
 
  On Thu, 2011-03-17 at 18:51 -0700, Amit More wrote:
   Hello all,
  
  
   I have installed samba version 3.3.2 on Ubuntu 9.04 server 32-bit
   following the documentation
   https://help.ubuntu.com/9.10/serverguide/C/samba-fileserver.html
  
  
   Windows and Ubuntu users can see and mount the shares with no problem
 at
   all.
  
   Mac OS 10.6.x users can connect to samba from terminal using smbclient,
   but they are refused connection when they try to connect via finder (ie
   using apple + k). The error Mac users get is “wrong username or
   password”. However, they can connect via finder only when they prefix
   the username with any domain name. They can pass any arbitrary domain
   name before the username to connect to the samba share.
  
  
   To be more clear here is an example
  
   smb://server.domain.com/File_share
   username: arbitrary-domain-name\username
  
  
   Also, Mac OS X users having problem connecting to samba running on
   Ubuntu server are able to mount the shares from Windows Server 2003 via
   finder.
  
  
   I have set the following parameters in my /etc/samba/smb.conf file
  
   workgroup = WORKGROUP
  
   server string = %h server (Samba, Ubuntu)
  
   dns proxy = no
  
   security = user
  
   encrypt passwords = true
  
   passdb backend = tdbsam
  
   obey pam restrictions = yes
  
   passwd program = /usr/bin/passwd %u
  
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*
   \spassword:* %n\n *password\supdated\ssuccessfully* .
  
   map to guest = bad user
  
   usershare allow guests = yes
  
   [share]
  
   comment = Ubuntu File Server Share
  
   path = /srv/samba/share
  
   browsable = yes
  
   guest ok = no
  
   read only = no
  
   create mask = 0755
  
  
  
   Things that I have tried:
  
1. Adding public = yes in share
  
2. Setting encryption = false
  
  
   I am new to samba and have been doing research for a long time to get
   this working. Is there any workaround for the problem that I am facing.
   I would appreciate all your help.
  
  
   Thanks in advance,
  
   Amit More
  
  
   --
   To unsubscribe from this list go to the following URL and read the
   instructions:  https://lists.samba.org/mailman/options/samba
 
  --
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Shared directory contained within another shared directory

2011-03-17 Thread Santiago DIEZ
I also thought about doing the same thing. I tested it but never actually
did it.

In my humble opinion, your config (mostly same as mine) would work without a
problem.

Cheers
---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Shared directory contained within another shared directory

2011-03-17 Thread Santiago Diez
In my case, the idea was that one departement already had a folder that they
were used to and that they wanted to share with the rest.
So instead of moving all the files, it looked simplier to just take this
very folder (it was a little deeper) and share it somewhere else.

Santiago


On Thu, Mar 17, 2011 at 3:52 PM, Daniel Müller muel...@tropenklinik.dewrote:

 Hello,

 why subdirectory!? Just make two simple shares for each group.
 Bind them together with dfs
 Ex-tree: +human-resources
 |
 +--hr
 |
 +--hr_readonly

 [global]
 Host msdfs=yes

 [human-resources]
 path = /shared/depts/dfsroot
 msdfs root = yes

 [hr]
comment = Human Resources
valid users = @DOMAIN+Personnel
path = /shared/depts/hr
guest ok = no
read only = no
create mask = 6770
force create mode = 6770
directory  mask = 6770
force directory mode = 6770

 [shared_hr]
comment = Human Resources Shared information with supervisors
valid users = @DOMAIN+Personnel @DOMAIN+Domain Admins
 @DOMAIN+hr_readonly
path = /shared/depts/hrshared
guest ok = no
writable = yes
read list = @DOMAIN+hr_readonly
create mask = 6770
force create mode = 6770
directory  mask = 6770
force directory mode = 6770

 In /shared/depts/dfsroot as root

 Ln -s msdfs:yourserver\\hr hr
 Ln -s msdfs;yourserver\\shared_hr shared_hr


 ---
 EDV Daniel Müller

 Leitung EDV
 Tropenklinik Paul-Lechler-Krankenhaus
 Paul-Lechler-Str. 24
 72076 Tübingen

 Tel.: 07071/206-463, Fax: 07071/206-499
 eMail: muel...@tropenklinik.de
 Internet: www.tropenklinik.de
 ---
 -Ursprüngliche Nachricht-
 Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org]
 Im
 Auftrag von Rod
 Gesendet: Donnerstag, 17. März 2011 15:26
 An: samba@lists.samba.org
 Betreff: [Samba] Shared directory contained within another shared directory

 Hello,

 I have Samba server running version 3.0.33-3.29.el5_5.1. The Samba
 server is a member server of a Windows 2003 domain. Winbind provides
 authentication.

 We have a physical directory named hr that is shared as hr and is
 accessible to the HR department. A subdirectory of the hr directory
 named hrshared is shared as hrshared and should be accessible to
 specific users that are not part of the HR department. File system
 permissions for the hr directory are set for the domain admin as owner
 and the HR department security group (in AD) as the group.  The file
 system permissions for the hrshared subdirectory are set for domain
 admin as owner and the security group that has the people that need
 access to the hrshared share. With permissions set as they are, users
 who are not part of the HR group are unable to access the hrshared
 folder. I'm assuming this is because the hrshared subdirectory is
 inheriting permissions from the parent hr directory.

 Here's the share specifications in smb.conf

 [hr]
comment = Human Resources
valid users = @DOMAIN+Personnel
path = /shared/depts/hr
guest ok = no
read only = no
create mask = 6770
force create mode = 6770
directory  mask = 6770
force directory mode = 6770

 [shared_hr]
comment = Human Resources Shared information with supervisors
valid users = @DOMAIN+Personnel @DOMAIN+Domain Admins
 @DOMAIN+hr_readonly
path = /shared/depts/hr/hrshared
guest ok = no
writable = yes
read list = @DOMAIN+hr_readonly
create mask = 6770
force create mode = 6770
directory  mask = 6770
force directory mode = 6770



 Is there a way to properly share a subdirectory that has different
 permissions than the parent directory?

 Any help is appreciated. Thanks.

 Rod
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 
___
TEL +33637908198 - MSN santiago.d...@free.fr - SKYPE chebarbudo - YAHOO MSG
santiago_diez
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Permission and Owner issue on child file/folder

2011-03-15 Thread Santiago DIEZ
Hi Brajesh,

As far as I know, you cannot do that.
Group can be inherited using the *s* permission (octal *2000*).
But the owner of a file will always be the user who created it.

Good luck
---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*




On Tue, Mar 15, 2011 at 12:08 PM, Brajesh Shrivastava brajeshs...@gmail.com
 wrote:

 Hi All

 I want to inherit the parent folder permission on its child file/folder.
 However, owner should be the same user who is creating file/folder (i.e.
 owner shouldn't be inherited from the parent directory). Is there any way
 to
 achieve this. I am currently using Samba 3.5.7.

 Thanks in advance.
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Permission and Owner issue on child file/folder

2011-03-15 Thread Santiago DIEZ
Thanks Motonobu for correcting me.

---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*




On Tue, Mar 15, 2011 at 12:19 PM, TAKAHASHI Motonobu mo...@monyo.comwrote:

 From: Brajesh Shrivastava brajeshs...@gmail.com
 Subject: [Samba] Permission and Owner issue on child file/folder
 Date: Tue, 15 Mar 2011 16:38:50 +0530

  Hi All
 
  I want to inherit the parent folder permission on its child file/folder.
  However, owner should be the same user who is creating file/folder (i.e.
  owner shouldn't be inherited from the parent directory). Is there any way
 to
  achieve this. I am currently using Samba 3.5.7.

 How about these parameters:
  inherit permissions = yes
  inherit owner = no

 The default of inherit owner is no.

 ---
 TAKAHASHI Motonobu mo...@monyo.com

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Permission and Owner issue on child file/folder

2011-03-15 Thread Santiago DIEZ
When I read Motonobu's answer, the first thing I did was go check the
parameter in 
smb.confhttp://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.htmlmanual.
It's quite obvious that the next parameter, just after *inherit owner (S)*is
*inherit permissions (S)*.
I guess that would do what you need.

---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*32 boulevard de Strasbourg, 75010 Paris*




On Tue, Mar 15, 2011 at 12:29 PM, Brajesh Shrivastava brajeshs...@gmail.com
 wrote:

 Thanks  a lot  Motonob for immediate response.

 Tried this combination, but it didn't work. When I am trying to create a
 file/folder then full control is being assigned to the user for that
 file/directory. I want to inherit the permission of user from parent
 directory instead of assigning full control.

 Please can you suggest in other way for this.

 Thanks

 On 15 March 2011 16:49, TAKAHASHI Motonobu mo...@monyo.com wrote:

  From: Brajesh Shrivastava brajeshs...@gmail.com
  Subject: [Samba] Permission and Owner issue on child file/folder
  Date: Tue, 15 Mar 2011 16:38:50 +0530
 
   Hi All
  
   I want to inherit the parent folder permission on its child
 file/folder.
   However, owner should be the same user who is creating file/folder
 (i.e.
   owner shouldn't be inherited from the parent directory). Is there any
 way
  to
   achieve this. I am currently using Samba 3.5.7.
 
  How about these parameters:
   inherit permissions = yes
   inherit owner = no
 
  The default of inherit owner is no.
 
  ---
  TAKAHASHI Motonobu mo...@monyo.com
 
 
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.5!

2011-03-07 Thread Santiago DIEZ
Hi Paulo,

Since Samba 3.3, the default passdb backend is *tdbsam*.
Which means users are stored in */var/lib/samba/passdb.tdb*.

This doesn't change the behavior of the command *smbpasswd*.
It still helps you manage users but they are just stored in another
location.

If you want to stick to *smbpasswd* backend, just add the following
directive in *smb.conf*.
passdb backend = smbpasswd:/etc/samba/smbpasswd

Hope this helps
---
*Santiago DIEZ
Directeur
**Portable: +33 6 37 90 81 98
Bureau: +33 9 70 44 77 87*
*1 route de Seurre, 21200 Beaune*

solutions *durables* pour l'informatique
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba with multiple domains with LDAP backend

2011-02-28 Thread Santiago DIEZ
Hi Lorenzo,

Unfortunately, I use tdbsam.
I'm happy though to share the result of my researches.
Don't think it wrong, I'm *not* a master, just a beginner a few days ahead
of you on that subject.

I create one directory per domain:
/domain_one/etc/samba/  # Where I put config files
 /domain_one/homes/  # Where I put users home directory
/domain_one/shares/ # Where I put domain shares
/domain_one/var/lib/samba/  # Where Samba stores tdb files
/domain_one/var/log/samba/  # Where Samba stores log files
/domain_one/var/run/samba/  # Where Samba stores pid files
/domain_two/etc/samba/
 /domain_two/homes/
/domain_two/shares/
/domain_two/var/lib/
/domain_two/var/log/
/domain_two/var/run/

Config file for domain_one: /domain_one/etc/samba/smb.conf
In red the values that you have to change for each domain.
You can't use the same netbios name and you have to bind to a different
interface each time.
[global]
# Names definition...
workgroup = *domain_one*
netbios name = *server_one*
server string = Galaxy
interfaces = *eth0*
bind interfaces only = yes
# Filesystem...
private dir =/domain_one/var/lib/samba
lock directory = /domain_one/var/lib/samba
log file =   /domain_one/var/log/samba/log.%m
pid directory =  /domain_one/var/run/samba
# Server type...
preferred master = yes
domain master = yes
domain logons = yes
time server = yes
passdb backend = tdbsam


I also changed the basic /etc/init.d/samba file and created one per domain:
for example /etc/init.d/samba-domain_one:
start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/nmbd --pidfile /
*domain_one*/var/run/samba/nmbd-smb.conf.pid -- -D -s /*domain_one*
/etc/samba/smb.conf
start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd --pidfile /
*domain_one*/var/run/samba/smbd-smb.conf.pid -- -D -s /*domain_one*
/etc/samba/smb.conf

I have to say, I have no idea what ldap is but I'd be interested in your
configuration too.
I here about ldap very often.

Cheers
---
*Santiago DIEZ
Directeur
*+33 6 37 90 81 98
+33 9 70 44 77 87




2011/2/28 Lorenzo Milesi lorenzo.mil...@yetopen.it

  I just finished configuring multiple domains on one server (debian +
  samba).

 Do you use LDAP as backend?
 If so, would you share configuration, and possibly an howto or something
 like that?

 thanks
 lorenzo

 --
 Lorenzo Milesi - lorenzo.mil...@yetopen.it

 YetOpen S.r.l. - http://www.yetopen.it/
 Via Carlo Torri Tarelli 19 - 23900 Lecco - ITALY -
 Tel 0341 220 205 - Fax 178 6070 222

 GPG/PGP Key-Id: 0xE704E230 - http://keyserver.linux.it

  D.Lgs. 196/2003 

 Si avverte che tutte le informazioni contenute in questo messaggio sono
 riservate ed a uso esclusivo del destinatario. Nel caso in cui questo
 messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo
 senza copiarlo, a non inoltrarlo a terzi e ad avvertirci non appena
 possibile.
 Grazie.


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba4 start error

2011-02-27 Thread Santiago DIEZ
Hi Peter,

What directory have you installed the binaries to?
Are you running the samba command with full path?
What command exactly?
Have you checked execution privilege on the partition?

Bye
---
*Santiago DIEZ
Directeur
*+33 6 37 90 81 98
+33 9 70 44 77 87




2011/2/27 Herczeg Péter h.pj...@gmail.com

 Dear All,

 I would like to ask your help:

 I have installed Samba4 by following the steps of Samba4 Wiki Howto to a
 Debian Server.

 - downloaded via git
 - compiled successfully
 - make quicktest is ok. (as far as I see during the process, it has written
 at the ned: ALL OK)
 - install is successful ('install' finished successfully)
 - DC provision is successful (get the summary windows at the end, only
 notice is to configure phpLDAPadmin)

 And the problem is:

 going to the next step, I try to starttest, but I get the error message
 when executing samba command:
 command not found

 tried to start as service but no success.
 if I used the install path in the same way as it written in the HowTo, how
 can I check is it running and is able to manage the domain?

 Thanks in advance,

 Peter
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba4 start error

2011-02-27 Thread Santiago DIEZ
Hi Peter,

If the install worked fine, then you should be able to run the daemon with:
/usr/local/samba/smbd -- -D
You probably can't call it without the full path because
/usr/local/samba/is not in your path.

If you want to remove a program compiled from source, go back to the source
directory and run
make uninstallbin
make uninstalldat
make uninstallman
make uninstallmo
make uninstallmsg
make uninstallscripts
make uninstall

Tell me if this helps
---
*Santiago DIEZ
Directeur
*+33 6 37 90 81 98
+33 9 70 44 77 87




2011/2/27 Herczeg Péter h.pj...@gmail.com

 Hi Santiago,

 I have tried the follow the HowTo precisely, so I have installed it to: *
 /usr/local/samba*
 By following the instructions (and wanted to run in standard mode) I have
 just typed samba.
 tried smbd, samba4, but no success.

 I did the whole downloading/compiling/installing/provisioning process as
 'root', I think it has full access for the partition.

 To make a very clean install how can I remove everything related to samba3
 or samba4? (during initial setup of Debian installation I have selected
 Samba to install as a feautre)
 I tried to remove with apt-get autoremove, but I got the error message that
 samba4 virtual package cannot be removed.

 since then, after I reinstalled samba4 followed the HowTo, the samba-master
 directory does not appear in my home folder (it was there, when I previously
 installed)

 If I send you the summary files or process information related to
 compiling/installing/provisioning can help you?

 Thanks for your time,

 Peter
 2011. február 27. 11:04 Santiago DIEZ írta, 
 santiago.d...@quark-systems.com:

 Hi Peter,

 What directory have you installed the binaries to?
 Are you running the samba command with full path?
 What command exactly?
 Have you checked execution privilege on the partition?

 Bye
 ---
 *Santiago DIEZ
 Directeur
 *+33 6 37 90 81 98
 +33 9 70 44 77 87




 2011/2/27 Herczeg Péter h.pj...@gmail.com

  Dear All,

 I would like to ask your help:

 I have installed Samba4 by following the steps of Samba4 Wiki Howto to a
 Debian Server.

 - downloaded via git
 - compiled successfully
 - make quicktest is ok. (as far as I see during the process, it has
 written
 at the ned: ALL OK)
 - install is successful ('install' finished successfully)
 - DC provision is successful (get the summary windows at the end, only
 notice is to configure phpLDAPadmin)

 And the problem is:

 going to the next step, I try to starttest, but I get the error message
 when executing samba command:
 command not found

 tried to start as service but no success.
 if I used the install path in the same way as it written in the HowTo,
 how
 can I check is it running and is able to manage the domain?

 Thanks in advance,

 Peter
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba





 --
 Herczeg Péter

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba with multiple domains with LDAP backend

2011-02-26 Thread Santiago DIEZ
Hi Lorenzo,

I just finished configuring multiple domains on one server (debian + samba).
I also had the IP issue and solved it with only one network card.
The idea is to create as many aliases as you need (eth0:0 is an alias for
eth0).

my */etc/network/interfaces* file:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:0
iface eth0:0 inet static
address 192.168.1.253
netmask 255.255.255.0
# no gateway for aliases
auto eth0:1
iface eth0:1 inet static
address 192.168.1.252
netmask 255.255.255.0
# no gateway for aliases
...

It is also important to change the */etc/hosts* file:
127.0.0.1  localhost.localdomain localhost
192.168.1.254  server1.domain1 server1
192.168.1.253  server2.domain2 server2
192.168.1.252  server3.domain3 server3
...

I'd be happy to share issues and successes.

B
---
*Santiago DIEZ
Directeur
*+33 6 37 90 81 98
+33 9 70 44 77 87




On Thu, Feb 24, 2011 at 11:08 PM, Lorenzo Milesi
lorenzo.mil...@yetopen.itwrote:

  You should create a distinct smb.conf for each domain.  You will want
  to
  allocate a unique IP on your server for each domain.  You will want
  to
  allocate a unique ldap toplevel container for each domain.  You will
  need to
  run separate instances of smbd (and nmbd and winbindd ) for each
  domain-
  you can specify the config file that you want.

 I found a couple of documents, including the following [1], which describe
 the setup with multiple smb.conf file, but it won't mention the multiple IP
 need.
 it looked strange to me that multiple instances of smbd could bind to the
 same port... so I see why some other docs exposed the request you did.

 [1]
 http://www.linuxforums.org/articles/setting-up-samba-pdc-for-multiple-domains_329.html

  It may be easier, depending on what you are doing, to create separate
  virtual machines (e.g. with Vmware ESX)  for each domain and truly
  isolate each samba domain.

 It was the first idea we got, but I'd rather not pursue it if I can,
 because that would mean administer [security updates, and so on] three
 different servers.

 Thanks

 --
 Lorenzo Milesi - lorenzo.mil...@yetopen.it

 YetOpen S.r.l. - http://www.yetopen.it/
 Via Carlo Torri Tarelli 19 - 23900 Lecco - ITALY -
 Tel 0341 220 205 - Fax 178 6070 222

 GPG/PGP Key-Id: 0xE704E230 - http://keyserver.linux.it

  D.Lgs. 196/2003 

 Si avverte che tutte le informazioni contenute in questo messaggio sono
 riservate ed a uso esclusivo del destinatario. Nel caso in cui questo
 messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo
 senza copiarlo, a non inoltrarlo a terzi e ad avvertirci non appena
 possibile.
 Grazie.

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba