<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"> <channel><title>Ruben Leusink Blog RSS</title> <description>RSS feed for www.rubeleusink.com/blog/</description><link>http://www.rubenleusink.com/blog/rss/</link> <item><title>Debian Samba filesharing with Microsoft Active Directory authentication</title> <description><![CDATA[I was trying to get my Debian Linux machines authenticating to a
Microsoft Active Directory. There are a few howtos on this subject, but
I had to merge them together to get it to work in a nice way on my
Debian machine.<br
/><br
/>Therefor I wrote this little howto, so it should
be easier for Debian users to get their Linux box authenticated on a
Windows Active Directory.<br
/><br
/>There are some steps you've to follow
to get it to work. There are some variables in this text, where you
have use your own names or IP's.<br
/><br
/>Well, let's start!<br
/><br
/><br
/><span
style="font-weight: bold;">Step 1</span><br
/><br
/>Install the needed packages by running the following command<br
/><br
/><blockquote># apt-get install krb5-config krb5-user krb5-doc winbind samba rdate</blockquote><br
/><span
style="font-weight: bold;">Step 2</span><br
/><br
/>Edit /etc/hosts so it looks like this:<br
/><br
/><blockquote>## /etc/hosts<br
/><br
/>127.0.0.1 hostname.DOMAIN.LOCAL localhost hostname<br
/></blockquote> <br
/><span
style="font-weight: bold;">Step 3</span><br
/><br
/>edit /etc/krb5.conf so it looks like this:<br
/><br
/><blockquote>## /etc/krb5.conf<br
/><br
/>[logging]<br
/><br
/>default = FILE:/var/log/krb5.log<br
/>kdc = FILE:/var/log/krb5kdc.log<br
/>admin_server = FILE:/var/log/kadmin.log<br
/><br
/><br
/>[libdefaults]<br
/><br
/>default_realm = DOMAIN.LOCAL <br
/>dns_lookup_realm = false<br
/>dns_lookup_kdc = false<br
/>clock_skew = 300<br
/>ticket_lifetime = 24h<br
/>forwardable = yes<br
/><br
/>[realms]<br
/><br
/>DOMAIN.LOCAL = {<br
/>kdc = hostname-of-your-domaincontroller.DOMAIN.LOCAL<br
/>admin_server = hostname-of-your-domaincontroller.DOMAIN.LOCAL<br
/>default_domain = DOMAIN.LOCAL<br
/>}<br
/><br
/><br
/>[domain_realm]<br
/><br
/>.kerberos.server = DOMAIN.LOCAL<br
/>.DOMAIN.LOCAL = DOMAIN.LOCAL<br
/></blockquote><font
size="2"><strong><em></em></strong></font><br
/> <span
style="font-weight: bold;">Step 4</span><br
/><br
/>Test connection to Active Directory by entering the following commands:<br
/><br
/><br
/><blockquote># kinit Administrator@DOMAIN.LOCAL</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><span
style="font-weight: bold;">Step 5</span><br
/><br
/>check if the request for the Active Directory ticket was successful using the kinit command<br
/><br
/><blockquote># klist</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/>The result of this command should be something like this:<br
/><br
/><blockquote>Ticket cache: FILE:/tmp/krb5cc_0<br
/><br
/>Default principal: administrator@DOMAIN.LOCAL<br
/><br
/><br
/>Valid starting Expires Service principal<br
/><br
/>09/10/08 12:07:01 09/10/08 22:05:53 krbtgt/DOMAIN.LOCAL@DOMAIN.LOCAL<br
/><br
/>renew until 09/11/08 12:07:01<br
style="font-style: italic;"></blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><br
/><span
style="font-weight: bold;">Step 6</span><br
/><br
/>Configure Samba by adjusting the Samba configuration file. Open /etc/samba/smb.conf and edit the file, so it looks like this:<br
/><br
/><blockquote>## /etc/samba/smb.conf&nbsp;<font
size="2"><strong><em></em></strong></font><br
/><br
/>[global]<br
/>workgroup = DOMAIN<br
/>realm = DOMAIN.LOCAL<br
/>load printers = no<br
/>preferred master = no<br
/>local master = no<br
/>server string = fileserver<br
/>password server = ip-of-your-domaincontroller<br
/>encrypt passwords = yes<br
/>security = ADS<br
/>netbios name = hostname-of-your-linux-fileserver<br
/>client signing = Yes<br
/>dns proxy = No<br
/>wins server = ip-of-your-domaincontroller<br
/>idmap uid = 10000-20000<br
/>idmap gid = 10000-20000<br
/>winbind separator = +<br
/>winbind enum users = Yes<br
/>winbind enum groups = Yes<br
/>winbind use default domain = Yes<br
/></blockquote><br
/><span
style="font-weight: bold;">Step 7</span><br
/><br
/>Restart samba by entering the following command:<br
/><br
/><blockquote># /etc/init.d/samba restart</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><font
style="font-style: italic;" size="2"><strong><em></em></strong></font>Now you're ready to join the Active Directory.<br
/><br
/><span
style="font-weight: bold;"><br
/>Step 8</span><br
/><br
/>Join the local domain / Active Directory by entering the following command:<br
/><br
/><blockquote><span
style="font-style: italic;"></span># net ads join -U administrator</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/>You
will be asked to enter the Active Directory Administrator password. When the
commandline doesn't return a value, your connection to the Active
Directory is set up.<br
/><br
/><span
style="font-weight: bold;">Step 9</span><br
/><br
/>Get the list of domainusers:<br
/><br
/><blockquote><span
style="font-style: italic;"></span># wbinfo -u<br
/></blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><span
style="font-weight: bold;">Step 10</span><br
/><br
/>Get the list of domain groups:<br
/><br
/><blockquote># wbinfo -g</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
style="font-style: italic;"><span
style="font-style: italic;"></span><span
style="font-weight: bold;">Step 11</span><br
/><br
/>Check your Samba configuration:<br
/><br
/><blockquote><span
style="font-style: italic;"></span># testparm -v<br
/></blockquote><font
style="font-style: italic;" size="2"><strong></strong></font><span
style="font-style: italic;"></span><br
/><span
style="font-weight: bold;">Step 12</span><br
/><br
/>Edit /etc/nsswitch.conf by making it look like this:<br
/><br
/><blockquote>/etc/nsswitch.conf<br
/><br
/>passwd:&nbsp;&nbsp;&nbsp;&nbsp; compat winbind<br
/>shadow:&nbsp;&nbsp;&nbsp;&nbsp; compat winbind<br
/>group:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; compat winbind<br
/></blockquote><br
/><span
style="font-style: italic;"></span><span
style="font-weight: bold;">Step 13</span><br
/><br
/>Create a home directory for each domain in /home<br
/><br
/><blockquote># mkdir /home/DOMAIN</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><br
/>And you're done! Your Linux box should now be working fine, using your Windows domaincontroller for authentication.<br
/><br
/>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br
/><br
/><span
style="text-decoration: underline; font-weight: bold;">Extra configuration/feature</span><br
/><br
/>It's
possible to change your Active Directory password using the <span
style="font-style: italic;">passwd</span> command. This
can be helpful for people who like using the terminal. Also, Linux
applications that use <span
style="font-style: italic;">passwd</span> for changing passwords will be able
to change your AD password.<br
/><br
/>This feature can be enabled by editing /etc/pam.d/passwd and /etc/pam.d/passwd. Make sure the files looks like this:<br
/><br
/><blockquote>## /etc/pam.d/passwd <br
/><br
/>password&nbsp;&nbsp; &nbsp;sufficient&nbsp;&nbsp;&nbsp;&nbsp; pam_winbind.so<br
/>password&nbsp;&nbsp; &nbsp;required &nbsp;&nbsp;&nbsp; &nbsp;pam_unix.so<br
/><br
/><br
/>## /etc/pam.d/passwd<br
/><br
/>password&nbsp;&nbsp;&nbsp; sufficient&nbsp;&nbsp;&nbsp; pam_winbind.so<br
/>password&nbsp;&nbsp;&nbsp; required&nbsp;&nbsp;&nbsp;&nbsp; pam_unix.so <br
/><br
/>auth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; include&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system-auth<br
/>account&nbsp;&nbsp; &nbsp;&nbsp; include&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system-auth<br
/>password&nbsp; &nbsp; include&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system-auth<br
/></blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><br
/>Do you have a question, a problem or a feature? Don't hesitate to <a
target="" rel="" title="Drop a line" href="http://rleusink.pb/contact-me/">drop me a line</a> or post a <br
/>comment.<br
/>]]></description><link>http://www.rubenleusink.com/blog/2009/07/debian-samba-filesharing-with-microsoft-active-directory-authentication/</link> <pubDate>Tue, 20 Jul 2010 19:16:58 +0200</pubDate> </item><item><title>Remove phpMyAdmin from your webroot!</title> <description><![CDATA[When setting a new domain, a new
webserver or a new database server, a lot of webmasters and webdevelopers
use <a
title="phpMyAdmin" href="http://www.phpmyadmin.net" target="_blank">phpMyAdmin</a> to control their MySQL databases. There are some alternatives, but in my opinion
phpmyadmin is one of the best available for the web. But where do you
have to put phpMyAdmin in your directory structure, while setting up
a website?<br
/><br
/>Most of the times I put it just behind
the root, e.g. <span
style="font-style: italic;">www.rubenleusink.com/phpmyadmin/</span>. It's just the most
handy thing to do for the time being, to place it in your webroot.
But even when it's handy, it's also one of the most insecure places
for it. Why? I'll explain it right away.<br
/><br
/>There are an awful lot exploids for
phpmyadmin. If you go through your access.log you'll see the enormous
amount of requests for different variants of phpmyadmin. I point you
to access.log, because Javascript based tracking code like Google Analytics don't
track those requests. Watching your access.log, you'll see  requests
for paths, like:<br
/><br
/><ul><li>/phpMyAdmin</li><li>/PHPmyadmin</li><li>/PhpMyAdmin</li><li>/phpMYadmin</li><li>and so on...</li></ul><br
/> With every update of phpMyAdmin, a new
exploid is also coming out. It's not that bad, but you've to remove
phpMyAdmin from your webroot. If you don't do that, you have a big
change that your server will be compromised with an exploid, writing
scripts in your /tmp/ directory and starting bash or perl code to get
some new scripts from bad servers, mostly from
Russian or Chinese ones. <br
/><br
/>The code of phpmyadmin wasn't written
to be used public on the internet. It was primarily written to
administer your mysql database within a secure environment, not to
stay on the web. <br
/>If you don't want your server to be
hacked or being used for other things then serving your webpages,
remove phpmyadmin from you webroot directly after you're done setting
up your website.]]></description><link>http://www.rubenleusink.com/blog/2009/10/remove-phpmyadmin-from-your-webroot/</link> <pubDate>Sat, 31 Oct 2009 15:36:06 +0100</pubDate> </item><item><title>Install xmms package on ubuntu hardy heron 8.04 without compiling</title> <description><![CDATA[As a mp3 playlist lover I would like to use a decent and simple program for playing mp3's. So I always use xmms, on every distro, also on Ubuntu.<br
/><br
/>Someone has decided to remove the xmms
package from the Ubuntu repositories. Why can't I decide for my own if I would
like to use xmms on my ubuntu?<br
/><br
/> I get the point why they did it. I think it was because of the little
bugs in xmms. But the <span
style="font-style: italic;">apt-get install xmms</span> command didn't help. The
package couldn't be found. <br
/>The strange part is that the rest of the
packages are still available. I think they have a little fever at Ubuntu
or something. <br
/><br
/>So this is a way to install xmms on Ubuntu without compiling.<br
/><br
/>Most people are talking about <a
href="http://blog.xanda.org/?p=436" target="_blank">compiling xmms from the source</a>. It's possible and works, but then you've to wait longer. And also, we're using a Debian based here! <br
/><br
/>It's also possible to install XMMS with the .deb package:<br
/><br
/><span
style="font-weight: bold;">Step 1</span><br
/>Download the <a
href="https://launchpad.net/ubuntu/hardy/i386/xmms/1:1.2.10+20070601-1build2" target="_blank">xmms .deb package</a> to your harddrive. <br
/><br
/><span
style="font-weight: bold;">Step 2</span><br
/>Run the installation by entering <br
/><br
/><blockquote>sudo dpkg -i xmms_1.2.10+20070601-1build2_i386.deb</blockquote><br
/><span
style="font-weight: bold;"></span>on the commandline. That's all! Very easy! Compiling is nice and fun, but sometimes apt is also.]]></description><link>http://www.rubenleusink.com/blog/2009/07/install-xmms-package-on-ubuntu-hardy-heron-804-without-compiling/</link> <pubDate>Fri, 26 Jun 2009 02:44:30 +0200</pubDate> </item><item><title>Kill your Windows XP client with the Service Pack 3 update</title> <description><![CDATA[Last
week, there was something wrong with the Service Pack 3 update on some
Windows XP clients. The update for SP3 had one or more major bugs in
it. I saw it happen on different architectures with different hardware.<br
/><br
/>Like we know from Windows, you have to guess what the problem is. And of course, it took a while before I got the real point.<br
/><br
/>The
problem started when some Windows XP clients, at random, choose to freeze
once in a while. But offcourse, the once in a while became more often.<br
/><br
/>First,
I thought there were some problems on the network itself. Kind of
strange, but you never know. After checking the Linux servers and
clients it became clear that the network was doing fine. It was almost sure that it must
have been a Windows issue.<br
/><br
/>So, what's next? Trying to flush the
DNS, reboot a couple of times, because you never know. It seemed to
have helped, but I didn't get a real answer to the solution. I still
didn't know what the problem was.<br
/><br
/>The problem even got worse.
More Windows XP clients had the same issue. Slowing down and freezing,
resulting in long waiting times. Then I noticed a difference. The
clients which didn't had the Service Pack 3 update, were still
operating normaly. The ones that got their Service Pack update weren't.<br
/><br
/>So,
finally I found the cause of this problem. Some clients didn't had the
update yet. Those clients were still working fine. Only the clients
that got the new Service Pack had these freezing problems. The solution was quite simple: remove Service Pack 3 from the system and most of the times it was rolling on the flow again.<br
/><br
/>But, sometimes the solution wasn't that simple. On some windows clients, the Service Pack 3 removal killed the client again after removing it.<br
/><br
/>Someones
had their Internet Explorer 7 removed, and the 6th version of IE didn't work
anymore. Other ones had their Microsoft Office installation partly
removed. <br
/><br
/>You can fix these problems by installing <a
rel="nofollow" href="http://www.microsoft.com/windows/internet-explorer/download-ie.aspx" target="_blank">Internet Explorer 7</a> from the Microsoft download site and repairing or reinstalling your Office installation. I hope you don't need this one.]]></description><link>http://www.rubenleusink.com/blog/2009/07/kill-your-windows-xp-client-with-the-service-pack-3-update/</link> <pubDate>Fri, 26 Jun 2009 02:43:30 +0200</pubDate> </item><item><title>Install psybnc on debian etch or Ubuntu</title> <description><![CDATA[<a
href="http://www.psybnc.at/about.html" target="_blank">PsyBNC</a> can be very usefull when you're traveling a lot or at moments you have to
change from computers all the time. psyBNC is an IRC bouncer, which
lets you always being logged in at IRC or Bitlbee.
When you log off with your local client, psyBNC still keeps you connected to the IRC or Bitlbee server while you're away. When you sign in again, psyBNC shows the messages you've missed from your friends.<br
/><br
/>To start using psybnc on a Debian or Ubuntu box, follow the next five steps:<br
/><br
/><span
style="font-weight: bold;">Step 1 </span><br
/>Install the <span
style="font-weight: bold; font-style: italic;">libc6</span>, <span
style="font-weight: bold; font-style: italic;">openssl</span> and <span
style="font-weight: bold; font-style: italic;">ncurses</span> library, by using:<br
/><br
/><blockquote># apt-get install libc6-dev libssl-dev libncurses5-dev</blockquote><font
style="font-style: italic;" size="2"><strong><em></em></strong></font><br
/><span
style="font-weight: bold;">Step 2</span><br
/>Create a target directory for psyBNC, download and untar the <a
href="http://www.psybnc.at/download.html" target="_blank">latest version of psyBNC</a>, with<br
/><br
/><blockquote># mkdir /path/to/psybnc/<br
/># cd /path/to/psybnc/<br
/># wget http://psyBNC-download-source/<br
/># tar zxvf psyBNC-2.3.2-7.tar.gz<br
/></blockquote><br
/><span
style="font-weight: bold;">Step </span><span
style="font-weight: bold;">3</span><br
/>Edit the config file config.sh to your desired needs:<br
/><br
/><blockquote># make menuconfig</blockquote><br
/>and
hit enter to start configuring psybnc.<br
/><br
/>The  standard compiling and bouncer-config
options can be used. If would like to change some specific settings for your situation, edit the file. PsyBNC will then handle things to your personal conditions.<br
/> <br
/><span
style="font-weight: bold;">Step </span><span
style="font-weight: bold;">4</span><br
/>After configuring, run<br
/><br
/><blockquote># make <br
/></blockquote><span
style="font-style: italic;"></span><font
size="2"><strong><em></em></strong></font><br
/>to start compiling. psyBNC is able to find out itself on which platform you're currently running.<br
/><br
/><span
style="font-weight: bold;">Step </span><span
style="font-weight: bold;">5</span><br
/>When the compiling is done some files are created. To start the psyBNC hit<br
/>(as root to test, as normal user when psyBNC is in production)<br
/><br
/><blockquote># ./psybnc&nbsp;&nbsp; <span
style="font-style: italic;">(only with root to test your application, after that: run it as an normal user)</span><br
/></blockquote> <span
style="font-style: italic;"></span><font
size="2"><strong><em></em></strong></font><br
/>To check and adjust your configuration, open psybnc.conf.<br
/><br
/>After that, configure your firewall, connect with an <a
href="http://www.xchat.org/screenshots/" target="_blank">IRC client</a> and chat through psyBNC!<br
/><br
/>Enjoy!<br
/>]]></description><link>http://www.rubenleusink.com/blog/2009/08/install-psybnc-on-debian-etch-or-ubuntu/</link> <pubDate>Fri, 26 Jun 2009 02:38:29 +0200</pubDate> </item> </channel> </rss>