I recently obtained a Mac Mini in order to replace an aging Windows XP file server on my family's network of Windows machines. I thought I would go through my troubles here to save others. The same process could be used in a small office, or a (small) school network. Since you will be adding users manually it may become troublesome to do more then 10 or so.
You will need to use the command line. I will give all the things you need to type in, but I am no unix expert so I may not be able to help you if you get in to trouble. Be aware that you may lose data.
The goal was to set up a server capable of being accessed from multiple computers simultaneously. I chose the Samba protocol because it is supported on all flavours of Windows, on Macs and on Linux. The method I used here is by no means definative, so please comment if you would do things differently!
I am using a G4 (1.5Ghz) Mac Mini with OSX 10.4.11 installed. The mini has bluetooth and wireless disabled. This howto could apply to any mac, although performance and mileage may vary.
Configure the mini to connect to your network using screen, keyboard and mouse as per normal setup. Give it a short, sensable name - preferably one word. Make sure this works before proceding!
You will need to install a VNC server. I installed OSXvnc, gave it a password and then enabled the "System Server" option. This allowed me to switch user accounts and restart or power down the mini without having to worry about where my VNC session would go. I've found OSXvnc far superior to Chicken of the VNC, which I have used in the past. Once the VNC server is configure and you can log in to it from another computer, disconnect the screen, keyboard and mouse and put the mini somewhere safe and out of the way.
You will need some sort of storage for the mini. I'm using a Data Robotics Drobo, but any external drive will do. I would recommend a Firewire drive if tossing up between USB and Firewire (the Drobo is only availible in USB), and an enclosure that supports hardware RAID such as the Newertech Guardian Maximus. Format your external storage to HFS using Disk Utility (/Applications/Utilities/), naming it "External Storage."
Both the Mini and the Drobo are running off a UPS. This isn't strictly necessary, but I certainly advise it. In my experience things run smoother and longer off a UPS even without power failures.
Log on as your administator account.
Using "Directory Access Utility" (/Applications/Utilities/), change the SMB/CIFS workgroup to that of your network. This is usually WORKGROUP if you have a network of Windows machines.
In System Preferences (/Applications/), set up a user account for everyone who will be accessing the storage. For me this was one account per person in the household, plus an administrator account and an account named "Shared" for a shared folder. This lets users exchange files via the server. I asked my family to choose their own passwords, but they could be left blank.
Still in System Preferences, go to Sharing and enable "Windows Sharing." Under Accounts select all the accounts that you want to be able to access the storage. I did not include the administrator account here.
I found that the mini would not mount external disks unless someone was signed in, so I set it to automatically sign in to the "Shared" account on boot.
Create a folder on the external disk (or array - I'll say "disk") for each user. I included the administrator account but only to put key downloaded files such as OSXvnc.
This is where we start to use the command line, so fire up Terminal (/Applications/Utilities/). Note that OSX is case sensitive, so be sure to enter commands very carefully. Once again, I am not responsible for loss of data/loved one/life
I created a folder on each user's desktop containing a symbolic link to their own folder on the external drive, as well as a symbolic link to the shared folder. Replace *USER1* with your first user (say, "Fred", without the quotation marks), *USER2* with the second user ("Bill"), and so on. The commands can be execute from the administrator's account. Type what I write in the "code" blocks.
Enter the password when asked.
If you were to switch users to *USER1*'s account, you would see a folder on the desktop called "Network Drive." Back in the terminal:
This creates the two symbolicly linked directories. Finally, type:
I repeated these steps (from "login") for each user. For the Shared user, I only created the "Shared" symbolic link (the second "ln -s ...").
Now, change to the directory the Samba config file is stored in:
Make a backup of you Samba Configuration file using this command:
Give it your password when it asks. Next, we are going to edit the Samba Config file:
You will see what looks like a text editor. Scroll down using the down arrow. You will see a section marked [global]. At the end of this block of text but before the next block marked [homes], I added these lines:
The first restricts access to people on my local network. The first phrase - "localhost" - means the mini itself. The second - "192.168.0." means anyone else on the network. You may have a different string of numbers for the second phrase. To check what your local IP range is, go to System Preferences and click Network. Under the heading "Built-in Ethernet" you will see something like this:
The phrase in the config file should be the first three numbers each seperated by a period, followed by an additional period: AAA.BBB.CCC. The last three numbers, DDD, are not included.
Since I didn't want anything shared but the folders I had created I went through and commented out the remaining lines with a semicolon:
and so on. Once everything is commented out, I started to add the lines that tell the Samba server where each user's files will be stored. This is basically just the location of the "Network Drive" folder we created for each user earlier. Type as follows:
This will create shared folder entry for *USER1* which is writable (not read only), browseable and *USER1* will have access to the files. I don't understand the unix access modes as well as I should, but I believe for added security you could have "createmode = 700" instead of 755. I hope someone with more smarts can confirm this.
Repeat this step for all users.
Once you have finished editing the Samba config file, hit ctrl+o to bring up the save option, hit enter to save changes then ctrl+x to exit. You'll be back at the command prompt.
We need to restart the Samba server so the changes have an effect. You can either restart the mini or simply type the following:
We're done with the mini now, so you can close the VNC session.
The following steps aren't necessary, but if everyone has their own computer I find it helpful. If you or your users will be moving from computer to computer, just use the log-in as discribed below every time you need to access the storage.
Go to *USER1*'s Windows computer. Go to "Network Neighbourhood," and click "Show Workgroup Computers," or just click "Network" in Vista. Find the mini listed there - if it's not listed, make sure that it's connected to the network and that it has the right workgroup. If you could access it via VNC, it should be there.
Double click. You should see a folder for every user you just created. Go to the one labled *USER1*. Double click. If it asks for a username and password, enter the following:
*NAME OF MINI* Represents the name that the mini shows up in your network, and *USER1'S PASSWORD* is, of course *USER1*'s password.
You should see two folders. One called "Private," the other "Shared." Right click on Private and select "Map Network Drive..."
In the drop-down menu, select "P:" (for private). The "Folder" field should already be filled out. Make sure "Reconnect at login" is selected. Next to that, click on "Connect using a different user name." Fill these fields out exactly as you did above. Click ok, and then click Finish.
You'll need to repeat these steps on every computer.
Hopefully this doesn't have any major errors and I haven't left anything out. I've spent several days trying to get this to work, including a few (useless) phone calls to Apple, so I hope I can save someone else the time and effort! Thanks go to O'Reilly for being a generally awesome Apple resource. If this thread is in the wrong place please move it for me - I wasn't sure if it ought to go here or not.
Enjoy your networking!
You will need to use the command line. I will give all the things you need to type in, but I am no unix expert so I may not be able to help you if you get in to trouble. Be aware that you may lose data.
The goal was to set up a server capable of being accessed from multiple computers simultaneously. I chose the Samba protocol because it is supported on all flavours of Windows, on Macs and on Linux. The method I used here is by no means definative, so please comment if you would do things differently!
I am using a G4 (1.5Ghz) Mac Mini with OSX 10.4.11 installed. The mini has bluetooth and wireless disabled. This howto could apply to any mac, although performance and mileage may vary.
Configure the mini to connect to your network using screen, keyboard and mouse as per normal setup. Give it a short, sensable name - preferably one word. Make sure this works before proceding!
You will need to install a VNC server. I installed OSXvnc, gave it a password and then enabled the "System Server" option. This allowed me to switch user accounts and restart or power down the mini without having to worry about where my VNC session would go. I've found OSXvnc far superior to Chicken of the VNC, which I have used in the past. Once the VNC server is configure and you can log in to it from another computer, disconnect the screen, keyboard and mouse and put the mini somewhere safe and out of the way.
You will need some sort of storage for the mini. I'm using a Data Robotics Drobo, but any external drive will do. I would recommend a Firewire drive if tossing up between USB and Firewire (the Drobo is only availible in USB), and an enclosure that supports hardware RAID such as the Newertech Guardian Maximus. Format your external storage to HFS using Disk Utility (/Applications/Utilities/), naming it "External Storage."
Both the Mini and the Drobo are running off a UPS. This isn't strictly necessary, but I certainly advise it. In my experience things run smoother and longer off a UPS even without power failures.
Log on as your administator account.
Using "Directory Access Utility" (/Applications/Utilities/), change the SMB/CIFS workgroup to that of your network. This is usually WORKGROUP if you have a network of Windows machines.
In System Preferences (/Applications/), set up a user account for everyone who will be accessing the storage. For me this was one account per person in the household, plus an administrator account and an account named "Shared" for a shared folder. This lets users exchange files via the server. I asked my family to choose their own passwords, but they could be left blank.
Still in System Preferences, go to Sharing and enable "Windows Sharing." Under Accounts select all the accounts that you want to be able to access the storage. I did not include the administrator account here.
I found that the mini would not mount external disks unless someone was signed in, so I set it to automatically sign in to the "Shared" account on boot.
Create a folder on the external disk (or array - I'll say "disk") for each user. I included the administrator account but only to put key downloaded files such as OSXvnc.
This is where we start to use the command line, so fire up Terminal (/Applications/Utilities/). Note that OSX is case sensitive, so be sure to enter commands very carefully. Once again, I am not responsible for loss of data/loved one/life
I created a folder on each user's desktop containing a symbolic link to their own folder on the external drive, as well as a symbolic link to the shared folder. Replace *USER1* with your first user (say, "Fred", without the quotation marks), *USER2* with the second user ("Bill"), and so on. The commands can be execute from the administrator's account. Type what I write in the "code" blocks.
Code:
login *USER1*
Enter the password when asked.
Code:
mkdir ~/Desktop/Network\ Drive/
If you were to switch users to *USER1*'s account, you would see a folder on the desktop called "Network Drive." Back in the terminal:
Code:
ln -s /Volumes/External\ Storage/*USER1*/ ~/Desktop/Network\ Drive/Private
ln -s /Volumes/External\ Storage/Shared/ ~/Desktop/Network\ Drive/Shared
This creates the two symbolicly linked directories. Finally, type:
Code:
logout
I repeated these steps (from "login") for each user. For the Shared user, I only created the "Shared" symbolic link (the second "ln -s ...").
Now, change to the directory the Samba config file is stored in:
Code:
cd /etc
Make a backup of you Samba Configuration file using this command:
Code:
sudo cp smb.conf smb.conf.back
Give it your password when it asks. Next, we are going to edit the Samba Config file:
Code:
sudo pico smb.conf
You will see what looks like a text editor. Scroll down using the down arrow. You will see a section marked [global]. At the end of this block of text but before the next block marked [homes], I added these lines:
Code:
hosts allow = localhost 192.168.0.
hide dot files = yes
The first restricts access to people on my local network. The first phrase - "localhost" - means the mini itself. The second - "192.168.0." means anyone else on the network. You may have a different string of numbers for the second phrase. To check what your local IP range is, go to System Preferences and click Network. Under the heading "Built-in Ethernet" you will see something like this:
Built-in Ethernet is currently active and has the IP address AAA.BBB.CCC.DDD.
The phrase in the config file should be the first three numbers each seperated by a period, followed by an additional period: AAA.BBB.CCC. The last three numbers, DDD, are not included.
Since I didn't want anything shared but the folders I had created I went through and commented out the remaining lines with a semicolon:
Code:
;[homes]
; comment = User Home Directories
; browseable = yes
; read only = yes
and so on. Once everything is commented out, I started to add the lines that tell the Samba server where each user's files will be stored. This is basically just the location of the "Network Drive" folder we created for each user earlier. Type as follows:
Code:
[*USER1*]
comment = *USER1*'s Network Storage
path = /Users/*USER1*/Desktop/Network Drive/
read only = no
browseable = yes
createmode = 755
This will create shared folder entry for *USER1* which is writable (not read only), browseable and *USER1* will have access to the files. I don't understand the unix access modes as well as I should, but I believe for added security you could have "createmode = 700" instead of 755. I hope someone with more smarts can confirm this.
Repeat this step for all users.
Once you have finished editing the Samba config file, hit ctrl+o to bring up the save option, hit enter to save changes then ctrl+x to exit. You'll be back at the command prompt.
We need to restart the Samba server so the changes have an effect. You can either restart the mini or simply type the following:
Code:
sudo killall -HUP smbd
We're done with the mini now, so you can close the VNC session.
The following steps aren't necessary, but if everyone has their own computer I find it helpful. If you or your users will be moving from computer to computer, just use the log-in as discribed below every time you need to access the storage.
Go to *USER1*'s Windows computer. Go to "Network Neighbourhood," and click "Show Workgroup Computers," or just click "Network" in Vista. Find the mini listed there - if it's not listed, make sure that it's connected to the network and that it has the right workgroup. If you could access it via VNC, it should be there.
Double click. You should see a folder for every user you just created. Go to the one labled *USER1*. Double click. If it asks for a username and password, enter the following:
Code:
User Name: *NAME OF MINI*\*USER1*
Password: *USER1's PASSWORD*
*NAME OF MINI* Represents the name that the mini shows up in your network, and *USER1'S PASSWORD* is, of course *USER1*'s password.
You should see two folders. One called "Private," the other "Shared." Right click on Private and select "Map Network Drive..."
In the drop-down menu, select "P:" (for private). The "Folder" field should already be filled out. Make sure "Reconnect at login" is selected. Next to that, click on "Connect using a different user name." Fill these fields out exactly as you did above. Click ok, and then click Finish.
You'll need to repeat these steps on every computer.
Hopefully this doesn't have any major errors and I haven't left anything out. I've spent several days trying to get this to work, including a few (useless) phone calls to Apple, so I hope I can save someone else the time and effort! Thanks go to O'Reilly for being a generally awesome Apple resource. If this thread is in the wrong place please move it for me - I wasn't sure if it ought to go here or not.
Enjoy your networking!