Samba LDAP

From PostgreSQL_wiki
Jump to: navigation, search

Samba LDAP

Voor elke samba ldap server:

apt-get install libpam-ldap libnss-ldap libpam-cracklib samba smbldap-tools db4.8-util smbclient slapd phpldapadmin
                ldap-utils cups subversion openssl

De samba ldap master heeft de winbindd daemon nodig voor netbios name resolution:

apt-get install winbind
You are right. In fact, I found out that if you provide the URI as "ldaps://..." then you need to explicitly tell Samba NOT to use TLS.

The incredibly obtuse way you do this is with the following configuration in smb.conf:

ldap ssl = off

The default for ldap ssl is "Start TLS". The values of yes, no, and on or no longer valid.


Okay i figured it out.
Now everything works fine:

in /etc/ldap.conf

after the line

Quote:

    ssl start tls



i had to add the line

Quote:

    ssl on



This made getent passwd and getent group work

In smb.conf

i had to remove the line

Quote:

    ldap ssl = start tls



but leave the line

Quote:

    passdb backend = ldapsam:ldaps://serveur.ville.test.local:636



This made net getlocalsid work

svn --username=user --password=xxxxx import /home/martin/dummy https://ldap-svn.webhuis.nl/productie-ldap/domein.nl -m "initieel domein.nl"
svn --username=user --password=xxxxx checkout https://ldap-svn.webhuis.nl/productie-ldap/domein.nl

Printen

Netwerk printen is een van de meest gecompliceerde en foutgevoelige dagelijkse taken waar gebruikers en beheerders mee te maken hebben. Je kunt een printer eenvoudig op een computer installeren, maar dat maakt het beheer lastig. De mooiste methode is een printer share aanmaken op de server. De werkplek computer installeert dan de voor geïnstalleerde printer van de Server. De Webhuis Kantoor Server maakt gebruik van de “driver download” methode, die gebruik maakt van geïnstalleerde en geconfigureerde stuurprogramma's op de server. De methode bestaat uit vier stappen:

  1. Installeer de printer op de Server met Cups, voor elke printer;
  2. Zorg voor de Cups drivers op de Linux Server, voor de eerst geïnstalleerde printer;
  3. Maak een Samba printer van de Cups printer, voor elke printer / print queue;
  4. Maak de printer als Domain Administrator beschikbaar, voor elke print share.

Werkwijze:

cups

ad 1. Cups printer installeren In de browser: http://10.10.10.11:631 Voer de dialoog uit bij printer toevoegen, de queue naam is de share naam.

ad 2. Zorg voor bijbehorende drivers in /usr/share/cups/drivers

ad 2.1. De eerst geïnstalleerde printer op de Server

  • de Negen bestanden
  • ppd driver met naam van de queue
  • doen als root.
  • met -H netbiosname

uitvoeren met -H netbiosname


in /home/user staat:

user@prod:~$ ls ­al
­rw­r­­r­­ 1 martin martin 38284 2007­02­06 20:25 cups­windows­6.0­ource.tar.bz2

Dit bestand bevat de benodigde drivers uitgepakt in de directory cups­windows­6.0/i386.

user@prod:~/cups­windows­6.0/i386$ ls ­al
­rw­r­­r­­  1 martin martin   803 2005­06­17 23:09 cups6.infr
rw­r­­r­­  1 martin martin    72 2005­06­17 23:09 cups6.ini
rw­r­­r­­  1 martin martin  9529 2005­06­17 23:09 cups6.ppd
rw­r­­r­­  1 martin martin 12568 2005­06­17 23:09 cupsps6.dll
rw­r­­r­­  1 martin martin 13672 2005­06­17 23:09 cupsui6.dll

Kopieer deze bestanden naar /usr/share/cups/drivers.

cups-samba

CUPS users may get the exact same package from <http://www.cups.org/ software.html>. It is a separate package from the CUPS-based software files, tagged as CUPS 1.1.x Windows NT/200x/XP Printer Driver for Samba (tar.gz, 192k). The filename to download is cups-samba-1.1.x.tar.gz. Upon untar and unzipping, it will reveal these files:

root# tar xvzf cups-samba-1.1.19.tar.gz
cups-samba.install
cups-samba.license
cups-samba.readme
cups-samba.remove
cups-samba.ss

These have been packaged with the ESP meta-packager software EPM. The * .install and *.remove files are simple shell scripts, which untar the *.ss (the *.ss is nothing else but a tar archive, which can be untarred by “tar” too). Then it puts the content into /usr/share/cups/drivers/. This content includes three files:

root# tar tv cups-samba.ss
cupsdrvr.dll
cupsui.dll
cups.hlp

The cups-samba.install shell scripts are easy to handle:

root# ./cups-samba.install
[....] Installing software...
Updating file permissions...
Running post-install commands...
Installation is complete.

The script should automatically put the driver files into the /usr/share/ cups/drivers/ directory:

root# cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/

cupsaddsmb op een Samba PDC cupsaddsmb -U <netbios-domain>\\root -H <fqdn> -h 10.x.y.z:631 -v irc2880

De Windows XP driver vinden

Dit is het lastigste stuk, het is foutgevoelig en in de Windows omgeving, je pikt er gemakkelijk de verkeerde driver tussen uit.

  • Zoek een Windows XP computer
  • Installeer op deze computer de Postscript Windows XP driver voor de gewenste printer
  • Zoek op deze Windows XP computer het bij de printer behorende PPD bestand, dat is de Postscript Printer Driver, het zijn er vaak meerdere
  • Plaats het gevonden ppd bestand onder een zinnige naam op: staging:/var/local/staging/cups-samba/samba-printer-xp-drivers

Samba printer maken

Zorg voor het bij de printer behorende ppd­bestand. Vaak staat dit bestand al in de directory­tree /usr/share/cups/model.

ad 3. Samba printer maken met cupsaddsmb

prod:~#    cupsaddsmb ­U Administrator ­v pr­sbg

ad 4. Printer beschikbaar stellen met Domain Administrator

  1. Login als Domain Administrator en voer de wizard “add printer” uit;
  2. Controleer de instellingen en bewaar de instellingen;
  3. Print test pagina.

clients

Mac OSx

Eerst de ldap benadering voor elkaarbrengen:

Dan Via adreslijsthulpprogramma, handmatig de ldap server aanmaken door op potloodje te klikken links onder bij de ldapv3 optie.

Troubleshooting

Profielen op een Samba PDC

Het probleem was dat de server de XP-profielen niet wilde wegschrijven. Het ligt aan de instelling van "De toegangsmachigingen tot mappen van zwervende profielen niet controleren" op de client, die je als Administrator moet aanpassen. Het heeft te maken met "Groepsbeleid". :-((

Programma gpedit.msc > Computerconfiguratie > Beheersjablonen > Systeem > Gebruikersprofielen.

Hieronder staat de tekst uit een post: https://lists.dulug.duke.edu/pipermail/dulug/2008-March/011307.html

Bill,

Thanks for the response to my last cry for help. Unfortunately, I did needroaming profiles for what I'm doing, so I had to do what I could to get it working. I tried the things you mentioned, and didn't have any luck. After attempting to do everything I could with the Vista machines, I decided, for giggles, to try it with my last XP Pro machine to see if it was Vista specific or if there was something broken with my Samba. I tried it with the XP machine and got a similar message. Given the age of XP, there was more on the InterTubes to search through, and I was brought to http://www.rmschneider.com/writing/xp_and_samba.html. Down at the bottom was the following advice:

Check for Roaming Profile Ownership

Used when Samba is configured to provide Primary Domain Control. See below<http://www.rmschneider.com/writing/xp_and_samba.html#RoamingProfile>for details.

  1. Run Group Policy editor (gpedit.msc)
  2. Select Computer Configuration > Administrative Templates >  System
  > User Profiles
  3. Enable the following:
  Do not check for user ownership of Roaming Profile Folders (Enabled)

I did that for the XP machine, reboot, and no longer gave me the temp profile message and actually kept my profile. So, I went to one of the Vista machines and tried it there. Voila! The problem was solved. I went through and made the change on all my Vista machines and now have roaming profiles working. Wanted to get this in the thread for posterity.

Also wanted to correct something from my initial email. The documentation that actually helped me get things working is found here: http://download.gna.org/smbldap-tools/docs/samba-ldap-howto/.

Now, on to Squid/SquidGuard magic.

Brian


Terug naar: Webhuis Infrastructuur