mBerube.net
A journey to .Net

Access machine by hostname between Linux and Windows without DNS server

Wednesday, 23 June 2010 12:39 by mBerube
(Also available in: français)

During setup of my Dev server, I found that I was able to access my Linux server by IP but not by name. The same thing was true from Linux to Windows. After a couple searches on the net, I realized that my network wasn't using a DNS server. It means that the name solution was made by another mecanism. In my case, my machine names are resolved using Netbios. So, how to make it works on Linux (specifically Ubuntu but it's pretty much the same for the other distrib I guest) :

  • Install samba (sudo apt-get install samba)
  • Once install, edit /etc/samba/smb.conf and, in the global settings section, set the workgroup and netbios name values to the proper values for your machine.

Your now able to access your Linux box by name from Windows. Now, how to do the other way (from Linux to Windows) :

  • edit /etc/nsswitch.conf and change the line hosts: file dns by hosts: file wins dns (order matters)
  • Finally, install winbind (sudo apt-get install winbind)

After that everything works as expected, from Windows and Linux. I hope it will works for you as well.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Programmer life
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRss comment feed

Starting a development server

Friday, 28 May 2010 20:18 by mBerube
(Also available in: français)

Hi

I'm a lot less involved in my blog for a couples weeks. Summer is coming and I also got a used Dell server, decommissioned by a company. That a good occasion to improve my sys admin skills and having a real development server.

I would not give all the details in that post but there's some situations I faced. For professional sys admin, all this is piece of cake but with my programmer background, many of these things were unknown to me just one month ago :

  • Installing et configuring RAID : the server has a Adaptec RAID card that I set for RAID 1 (mirror) and everything works, easily and quickly (but I still have some performance issue to check for later)
  • Installing an OS on DVD on a server with only a CD-ROM drive : here, new challenge. I could buy a DVD ROM and install it but I don't like really much working with fragile optical media so I looked for alternatives and I found the procedure to format a USB thumb drive, make it bootable and use it to install the OS. For the details of that procedure, go to Technet. To install the OS (windows server 2008 R2), nothing special, except a bit of extra work to find the RAID card drivers. For the rest, it's almost the same as intalling Vista or Windows 7.
  • Partitions : I like having a partition for the OS and software ande another one for data. I forgot to do it before installing windows server but the Disk Manager is awesome. You can resize a partition like Partition Magic does but you can also do it live, on the OS partition, with the server running. Wow !
  • RAM Upgrade : the machine came with 1GB of RAM. It was a bit low for the tasks I want this machine to accomplish (see below). I bought 2x2gb ram in my favorite computer parts retailer. I was wrong. I learned (the hard way) that server are more specific about the kind of ram they support. I finally found a supplier for the right kind of RAM I needed (it cost me a little more but not much) and now my server have 5gb of ram, enough to do what it needs to do.
  • The softwares:
    • SQL Server : I has never install the full version of SQL server before (by that, I means, not the Express version). It's a bit more complicated than express, there's many service accounts to create and I didn't help myself by putting the database files at the wrong place but I finally make it works. Remember to setup TCP access to SQL server to allow connection from another machine.
    • IIS 7.5 : easy to install and with a little add-on (IIS Management Console), you can manage the IIS server completely from the IIS on your local machine. Nice.
    • VisualSVN Server : the simplest way to setup a Subversion server. It's a little (and free) tool that you install on windows and that simplify all administrative tasks of a source control. On the dev machine,  TotoiseSVN is a must.
    • Vmware server : my server is too old for the Microsoft virtualization technology (Hyper-V) so I installed Vmware Server. It's not really complicated to install, you use a Web interface to administer your virtual machines. It make administration easy and portable but the web application have somes bugs. I also have difficulties installing properly Ubuntu server (I'm at my 3rd attempts) for PHP and Ruby development. I'm still working on this.

That's it. This is where I spent most of my free time for the last weeks so you understand why my blogs isn't as active as it could be. I keep you informed.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Programmer life
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRss comment feed

A wonderful tool named Process Explorer

Thursday, 29 April 2010 21:34 by mBerube
(Also available in: français)

This week, I had to fight a problem on my girl friend's PC. CPU was always running at 100% and the faulty process was svchost. Not really helpful when we know that it's a really generic program hosting many things in Windows. In that kind of situation, I use  Process Explorer, a free tool originally created by Sysinternals, that Microsoft have acquired. This tool give a lot more informations than task manager (like programme name, dll loaded, etc.) which help finding what's going wrong and fixing it. In my case, it was a buggy HP printer driver (is someone suprised ...)

There's some screenshot from TechNet website

In the Sysinternals tool box, there's many more useful programs to explore. Take some time to take a look.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Easiest geek life
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRss comment feed

Windows Home Server for developer

Thursday, 22 April 2010 22:47 by mBerube
(Also available in: français)

Last year, after the good comments of Scott Hanselman, I decided to try Windows Home Server, a light version of Windows Server 2003. It's a really integrated OS that allow easy file sharing between all home PC (music, photos, videos), easy and complete backup of all the connected machines and allow to backup all this on an external drive to put in a safe place in case the server is destroy, lose or stealed.

I installed it on a old machine (a 10 years old AMD athlon) and it worked pretty well (but I had some stability problem, mostly caused by aging componants). Also, I began to run out of space and IDE HD are hard to find and cost more than SATA. So, I decided to use a real WHS solution, the Acer Aspire Easy Store Home Server:

I used it for a week now and everything is fine. The transfer was very long (400 gb on a 100mb network takes time), that's a really quiet machine, thanks to Atom processor that consume less energy and runs cooler.

WHS come with a connector that allow basic administration of the machine. It gives access to all operations a home user requires. (BTW, MS sells WHS as a simple consumer product that everybody can setup. FALSE. You need some basic knowledge in Windows Security and networking. Geek required !).

It's also a product that can be really useful for a small developers team because WHS allow sharing and backup for up to 10 PC. As a dev, you surely know how to use RDP so you can connect directly to the box and do almost anything you can do in Windows Server 2003. Beware because WHS use a technology called Drive Extender that create a kind of "raid" where all the disks are added and shown as a big storage space:

Dont' use tools like that manage disks (disk management, RAID controller, defragmenter), let WHS do it and use shared folders to transfer your files.

There's 2 interesting things to do with your WHS:

  • WHS allow remote access to files using a web interface. You'll then see that IIS (6.0) is installed and fully functional on the machine and makes it a really good candidate for QA web site before putting them in production. If you need database, I installed SQLServer 2008 Express without problem.
  • That's also a really good place to put your source code repository. Personally, I use Visual SVN to manage my repositories and I've included them to a shared folder (that is included in my backup) so my SVN database is automatically included in my weekly offsite backup. Really great !

Finally, there's many Add-ins availables, mostly on We got served to add more cool features to your server. It's an interesting product and it relatively low price (less than 400$, OS included), makes it a simple and cheap solution for home and work.

P.S : I don' receive anything from MS to comment that product, I'm just a enthousiast user !

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Easiest geek life | Programmer life
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRss comment feed

When you spend to much time moderating, introduce a captcha

Friday, 9 April 2010 20:56 by mBerube
(Also available in: français)

After 3 months moderating comments manually, I had to introduce a captcha due to an exponential increase of the spam in the last month. After spending many hours trying to integrate recaptcha, I finally found a post on Code Capers which was exactly what I needed. Thank Michael.

It's simple, a little less secure than recaptcha but should be good enough.

Sorry for the legetimate users but you know like me it's a necessary evil.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   BlogEngine.NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRss comment feed