Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Morning Guys and Gals. I have only just recently decided to make the jump from a windooze environment to a partial linux network. With this in mind, I have a small network at home that I will slowly be rebuilding. It currently involves 1x smoothwall express 3.0 polar machine as the firewall, 2x Windows XP workstations and 1x Windows XP Workgroup server. I would ideally like to replace the XP Workgroup server with linux, and also install an additional linux box as a simple test web server. What do you guys recommend? I have played with Ubuntu 7.10 and 8.04 and it seems pretty straight forward. I would like to replace the XP Workgroup Server with a linux box running Samba. The machine has 2x hard drives, the primary drive with XP (NTFS Formatted) and a second data drive with existing shares, also formatted with NTFS.
Any advice would be greatly appreciated.
Have a browse through 'distrowatch.org' to see if there are any distros set up just for you.
If your primary concern is replacing a file server, that's easily accomplished with just about any distro + SAMBA. What I would generally do when there is a WinDuhs network is:
1. Set up LDAP
2. Set up Samba as Primary Domain Controller, authenticating from LDAP with groups and permissions, network data directories, etc etc etc determined from LDAP.
That setup will give you the best control of things although it's certainly not a simple setup.
The alternative of course is to just use SAMBA and share some directories/files via symlinks as appropriate - that cuts out the ~2 weeks you'd spend getting a grip on LDAP and in many situations is adequate for what you need. The advantages offered by LDAP are storing and sharing contact information (supplier contacts, customer contacts, etc) and many email clients integrate pretty well with LDAP (for example, control-K to look up contact info).
So, you can have pretty sophisticated setups if you want to spend a few weeks tinkering on a computer before you finally switch over. Otherwise if all you want is a pretty brainless file server + primary domain controller (which allows people to sit at any computer and log in with a single password), you can set this up in a day with pretty much any distro.
Thanks for the valuable information. I have followed that link to howtoforge and will "try" to follow their steps in setting up a samba server.
Just a quick question as a follow up. Normally I would create a backup of the data on the second drive but due to the large quantity this has become somewhat of a non-event (Hardware failure of external usb backup drive). Can you simple map the existing shares on this NTFS drive in Samba? If so how? I have read the samba stuff (ending confused in some cases) and have found no information regarding utilising existing windows shares. Is it possible just to mount the shares in samba as is or do I need to go through the exercise of backing stuff up across multiple drives and then beginning from scratch?
Sorry for the dimwitted questions. I am still a windows guys, trying to leave the darkside.
Can you simple map the existing shares on this NTFS drive in Samba? If so how?
In Linux, every partition you want to access to, is mounted in some point of the directory tree (normally, under /mnt or /media), and then every program just accesses to it regardless of what kind of filesystem the partition has. For example, NTFS partitions are usually mounted in /mnt/windows, or something like this, and you can then access its files transparently. Samba can share this folder that contains the NTFS partition, as any other.
The only problem with non-Linux partitions are the permissions. Since NTFS permissions (which are called "DACL's") are different from Linux permissions, then NTFS DACL's are ignored, and the whole filesystem is mounted with the same permissions. For example, you must mount the whole partition read-only for all users, or read-write for all users.
So I recommend moving the data to a Linux partition. This has another advantage: you can use linux's ext3 or reiserfs filesystems, which have a protection method (called "journaling") to avoid file corruption if the server is suddenly shut down.
For last: if you want to set up an Ubuntu LDAP+Samba and many other things VERY EASILY, have a look at this page:
1. Get a static IP for the network.
2. Install a copy of "sftpdrive" on each windows computer (that way, you never need samba again!) You have to buy this (~$40 per copy).
3. Install a Linux computer with RAID 1 hard drives and a jumbo drive to make backups to.
4. Smoothwall for your firewall.
5. Gigabit cards for all but the firewall.
6. Enable remote access on all the windows computers or VNC.
Each windows computer has a guest account. Each user gets their own "ssh" account on the linux file server. They use sftpdrive to access their data on the main file server. If they go home, they can hook up to the main file server with a copy of sftpdrive and access files just as they would at work.
There are no other accounts, other than the file shares and intranet. Email is handled through google mail. Firewall permits some tunneling over encrypted ssh tunnel.
A company intranet, running a LAMP (xampp) server has its own passwords and accounts to do internals (accounting, purchase orders, inventory, etc.)
Data transfer over the network is 2-8MB per second on the gigabit network. If any computer explodes, all valuable data is on the file server (raid & jumbo disk backup) and installing a new windows computer takes about 3 days, including all the stupid patches and software installs. An initial disk dump is done upon new install.
Installing an extra Linux computer is pretty easy too - nfs/nis manages accounts. Suse Linux install time is about 8-16 hours (2 days), and Ubuntu installs a little quicker, with its apt tools.
Very clean. Very efficient. Very Web 2.0 friendly.
Being a helpdesk moderator with the Education Department in Victoria, Australia you quickly learn to appreciate all the help and guidance from those far more knowledgeable. I would like to take this opportunity to provide thanks.
...Normally I would create a backup of the data on the second drive but due to the large quantity this has become somewhat of a non-event....... Can you simple map the existing shares on this NTFS drive in Samba?
Once Linux is doing your file sharing, it is really easy to set up a cron job that takes daily, hourly, weekly etc. snapshots of your data, compresses is and backs it up. I back up my data every 15 minutes.
In regards to mapping samba shares, it sounds like you might be missing some theory. Maybe this will help:
Microsoft client computers (Win98,XP,Vista) are essentially "user-less" and work as if everyone is a root user. This is what people are used to, so there is no reason to change it. This means sharing files is a huge issue, because there are no permissions.
samba: Samba is a quick-hack protocol to allow file shares between computers that don't really have permissions. The samba configuration "super-imposes" permissions onto a permission-less file system.
The result is a very complicated samba configuration file. If your samba config file is simple, you are sharing files without permissions, which is usually good enough.
Once a samba "share" is created, another computer with appropriate permissions can "mount" the share and use it. Network Neighborhood is a tool that lets you view the available shares, and mount them as disk drives.
On Linux, you put the samba shares you want to mount in your /etc/fstab file, and make a directory to want to mount the share.
So when you say "map the shares on the ntfs drive to samba", you are missing the point. Samba is a program that makes specific directories available with "fake" permissions. It makes the directories available over the network. Since its over the network, ntfs or fat (or any other file system) is irrelevant.
If you had an ntfs drive, and wanted to share the data using linux as your file server, you would plug in the ntfs drive to your ide port, mount the drive locally (usually under /mnt/my_fancy_drive or /mnt/ntfs) and then create "samba shares" which allows other computers to view the shares with the specified permissions.
An easier way is to mount the drive and install sftpdrive on the Windows computers. Then, create an "account" for each type of permissions on the linux server and use the built in ssh server to handle everything. For instance, a user named 'msword' would be created. The home directory would be '/home/msword'. Password would be 'msword'. Then, users would use sftpdrive to connect to the home directory of user msword. All permissions would ALREADY be managed and you wouldn't have to set up any more configurations. Everything is encrypted and all the headaches go away. 1 minute of server config time (creating the account). Multiple users could all use the same share/password at the same time.
If you are having trouble with samba configuration, join the club. A lot of organizations opt to do away with samba because its configuration takes so much time. Also, it isn't encrypted and can't be used remotely anyway, so its use is limited to being in the building.
Also, be aware the Samba shares don't always 'stat' correctly. It can be several minutes before updated files become visible over the file system. Windows doesn't like to let non-windows computers know what it is up to and sometimes gives stale file data.
Stoobers, just so I understand the principal in my simple windows infected mind. At the moment my windows network basically is 3x windows xp machines all connected in a workgroup environment with a single netcomm nb5+ adsl modem. One of the windows xp professional machines currently functions as a server with a second hard drive with a number of individual folders all shared out to the other two machines. The security of these shares is, in all honesty non-existent. Just simple mappings that allow everyone to add, amend or delete the contents. The drive is formatted as ntfs.
I will install Ubuntu 8.04 LTS Server on the first drive as the operating system and then install the second drive as the data drive. I have tinkered with Samba previously but never utilizing existing data. It would simply then be a matter of configuring the samba.conf file to share out those drives to the two remaining xp machines.
Being that there is no security settings imposed under windows xp in its current shape there should be no problems simply just removing the shared components before blowing away windows, leaving only the folder structure in place and then creating the entries in the samba configuration file once everything is configured in ubuntu?
I have chosen, after reading a number of entries, both here and on other forums to just install ubuntu and samba and not worry at this point about LDAP as it falls outside the scope of works for my home network.
Be aware that MS and Linux use different filesystem formats. Its going to be simpler in the long run if you back up anything you need from your current server before you replace it with a completely Linux server.
With only a handful of XP machines & users, using the default "security = user" and using "smbpasswd" instead of a more complicated password backend should work fine. The standard profile share and an additional guest share would allow users to save files in their own shares or a public share.
Also, check in /usr/share/doc/samba-<version>/ for the pdf or postscript versions of the book "Samba 3 by Example". You may have a separate "samba-doc" package.
Using samba-swat can make installing a server easy as well. It is a part of the Samba installation and allows configuring Samba via a web browser: "http://localhost:901". First check whether it is disabled in /etc/xinetd.d/swat, by removing the "disabled = yes" line. Then restart the xinetd service. This web interface is also a handy way to restart the samba services and monitor which shares are being used.
A first step in migrating from MS can be to use Open Source alternatives on XP. For example, using the OpenOffice and one of many alternatives for e-mail, and Firefox for browsing, can ease the transition by letting users get aquainted with the same OS programs they would run in Linux.