We are a small startup company where we all work on Apple computers. I was wondering whether we could centralise the user accounts on a single server so anyone could log into their account from any of the available computers running OSX.
So I would need to set up an account server, the question is - do I have to buy apple proprietary solution or can I set my own (linux) server to do that?
Yes, you would need to look into setting up a LDAP server. OS X clients can also authenticate against Microsoft's Active Directory. I've never setup a Linux LDAP server for OS X clients but I am sure there are plenty of guides out there if you google a bit. However since OS X Server licenses are only $20 on Apple's App Store, I dont know why you would go thru all the trouble of setting up a Linux LDAP server since Apple's management tools would be more intuitive to use and the cost is negligible.
You can do either, it's VERY easy to do this using OSX Server, which is very cheap in itself, but you can have similar services running on Linux - they may not work as well but they may, you've got a lot of learning ahead of you I fear.
If you're starting from zero (no directory services at all), I'd recommend looking at Active Directory as Apple has good support for connecting Macs to AD, and it should also be possible to have your Linux servers leverage it as well. If you don't want to set up Windows servers in your shop, you can use Microsoft Azure to host your Active Directory services:
http://www.windowsazure.com/en-us/services/active-directory/
If you have an OpenLDAP server already running, you can set up your Macs to connect to your OpenLDAP server using the Mac's LDAP plug-in. I've got a script available on GitHub that will Macs running 10.6.x through 10.9.x to connect to an OpenLDAP server using a simple anonymous bind.
https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/open-ldap_bind_script