PDA

View Full Version : Old PC as Linux File Server




XIII
Aug 25, 2006, 12:38 PM
Hey guys, sorry if this is the wrong forum - couldn't really find one more appropriate, and there was an "old computer uses" thread in this forum a while back.

I now have in my possession a PIII 500mhz, 256mb RAM, 20GB HD machine.. and I would like to turn it into some network storage server somehow, that both the iMacs on the network can access (no PCs here (well, apart from this old one :))). I was thinking I could drop a gigabit ethernet card in it, buy a gigabit ethernet router, and link both the iMacs up to the router with gigabit ethernet cable.. meaning fast transfer speeds - faster than USB 2, right?

Now, I've heard people talking about how Linux should be used to make it a file server.. and I know precisely nothing about Linux. What distribution should I use? Why Linux? And what do I need to do once I have put some internal HDs in the old PC to get them to permanently appear on the Mac's desktops?

Also - is there some limit to the hard drive size I can use internally - I thought I read something about that.. :confused: And finally - NASLite (http://www.serverelements.com/) Linux file server software - anyone heard anything about this? I found it googling for Linux file server solutions, or something, and it appears it makes this all... uhh.. easier?

Sorry for the large number of questions.. I'm just a bit of a n00b when it comes to this. :p All help would be appreciated, and anything I've overlooked.

Thanks a tonne,

Jack



tipdrill407
Aug 25, 2006, 01:02 PM
Linux are typically used in server environments because they are more stable and lightweight (if you install it without a GUI). Also if you know nothing about Linux you might find linux very frustrating because even the simplest distributions are not very user friendly. Ubuntu or SUSE are some of the most user friendly distrubutions, but you'll still need to mess around a lot to learn how to use them.

mikes63737
Aug 25, 2006, 01:38 PM
On my Linux box, I'm running CentOS (http://www.centos.org) Linux and I found it very easy to set up. If you install a GUI (either KDE or GNOME) and then Samba, you should be able to set up a Samba file server very easily. You can connect to the server by going to Go->Connect To Server (command K) and then typing smb://<IP Address>/<Share>/.

CentOS does have a support forum.

FreeNAS (http://www.freenas.org/index.php?option=com_frontpage&Itemid=1) is also a good choice. I've tried it before, and I found that it worked very well for a file server.

I'm not sure how to make them permanently mount to the desktop... this (http://www.bombich.com/mactips/automount.html) might be what you're looking for.

XIII
Aug 25, 2006, 02:23 PM
On my Linux box, I'm running CentOS (http://www.centos.org) Linux and I found it very easy to set up. If you install a GUI (either KDE or GNOME) and then Samba, you should be able to set up a Samba file server very easily. You can connect to the server by going to Go->Connect To Server (command K) and then typing smb://<IP Address>/<Share>/.

CentOS does have a support forum.

FreeNAS (http://www.freenas.org/index.php?option=com_frontpage&Itemid=1) is also a good choice. I've tried it before, and I found that it worked very well for a file server.

I'm not sure how to make them permanently mount to the desktop... this (http://www.bombich.com/mactips/automount.html) might be what you're looking for.

Thanks a lot.

So - if I install a variation of Linux, then a GUI, then Samba.. is Samba some app I need running all the time or something on the Linux box? And when I connect to the server in OS X (hopefully that auto connect thing would work - I am planning to have my Movies folder on this network connected HD, and hope Front Row can see it) it will just appear as an HD on my desktop? Like an external HD would?

Thanks.

iTwitch
Aug 25, 2006, 02:35 PM
I have a Mandrake Linux desktop running Samba. Samba is a prog or service that loads on startup and waits for a request. You don't need a GUI but it may help you set things up. Once you mount a Samba share it will show up on your desktop.

Edit: You could run this headless (no monitor, video card or keyboard) once you get it up and running and SSH into from your Mac as needed. Of course you'll need sshd running on the linux box but that's no big deal.

XIII
Aug 25, 2006, 02:55 PM
I have a Mandrake Linux desktop running Samba. Samba is a prog or service that loads on startup and waits for a request. You don't need a GUI but it may help you set things up. Once you mount a Samba share it will show up on your desktop.

Edit: You could run this headless (no monitor, video card or keyboard) once you get it up and running and SSH into from your Mac as needed. Of course you'll need sshd running on the linux box but that's no big deal.

Ok. What exactly is SSHD? Ideally, yeah, I'd like to run the Linux box headless.

I've just spent the last hour or so reading up on freeNAS and NASlite. Are these just like operating systems? Do you install them instead of Linux? They seem the simplest way to me to do what I want to do.

Thanks.

iTwitch
Aug 25, 2006, 03:31 PM
Ok. What exactly is SSHD? Ideally, yeah, I'd like to run the Linux box headless.

I've just spent the last hour or so reading up on freeNAS and NASlite. Are these just like operating systems? Do you install them instead of Linux? They seem the simplest way to me to do what I want to do.

Thanks.

sshd - Secure Shell daemon, daemon is a process that sits there and waits to be called upon.

Never heard of freeNAS or NASlite. You can download everything you need for the cost of your time and connection. The Ubuntu distro seems to be popular now,

http://www.ubuntu.com/

Usually when you install a linux distro you choose what you want installed and you can always add features later. You probably want to choose a standad install along with Samba and Openssh?

Edit: Just Googled freeNAS, it appears to be a freebsd based OS. It would probably do you just as well as a linux solution?

XIII
Aug 25, 2006, 03:42 PM
sshd - Secure Shell daemon, daemon is a process that sits there and waits to be called upon.

Never heard of freeNAS or NASlite. You can download everything you need for the cost of your time and connection. The Ubuntu distro seems to be popular now,

http://www.ubuntu.com/

Usually when you install a linux distro you choose what you want installed and you can always add features later. You probably want to choose a standad install along with Samba and Openssh?

Edit: Just Googled freeNAS, it appears to be a freebsd based OS. It would probably do you just as well as a linux solution?

Ok, that makes a lot more sense now, haha.. thanks.. something clicked. :p So basically either the Linux solution or the NAS s/w will work for me.. just try it.

I'm sure as I try to do one of the two, I will run into some massive problems, and I'll come running for help here. :p

I just need to find now a wireless router, with a built in ADSL modem, and gigabit ethernet ports. :o :)

SimonTheSoundMa
Aug 25, 2006, 03:55 PM
I would go for RedHat, do not use Fedora Core, it's a little unstable.

Linux is also Unix like, so you can configure it from any of your Macs via terminal.

Samba is only useful to having Windows machines needing to connect to the server. You just need to mount the volume.

nplima
Aug 25, 2006, 04:22 PM
Hi

Ubuntu Linux is getting good press lately and tehre's good reasons for that. The instalation procedure is easy to understand, the bundled apps are solid and there is a very good selection of hardware drivers included, meaning that in many cases you don't have to do much of anything to get all the components working.

You should go for the "xubuntu" variety ( http://www.xubuntu.org/ ) and then look up the chapters you need over at the Ubuntu Guide: http://ubuntuguide.org/wiki/Dapper. You'll have your file server running in no time!

After you set the basic things up on your server, look up the "remote administration" and "VNC server" questions. Enabling those will allow you to remotely control your server from your macs, either by using the terminal or by VNC (which shows the remote desktop on your screen).

XIII
Aug 25, 2006, 05:11 PM
Hi

Ubuntu Linux is getting good press lately and tehre's good reasons for that. The instalation procedure is easy to understand, the bundled apps are solid and there is a very good selection of hardware drivers included, meaning that in many cases you don't have to do much of anything to get all the components working.

You should go for the "xubuntu" variety ( http://www.xubuntu.org/ ) and then look up the chapters you need over at the Ubuntu Guide: http://ubuntuguide.org/wiki/Dapper. You'll have your file server running in no time!

After you set the basic things up on your server, look up the "remote administration" and "VNC server" questions. Enabling those will allow you to remotely control your server from your macs, either by using the terminal or by VNC (which shows the remote desktop on your screen).

Thanks for your reply. The Ubuntu guide is very intimidating.. any particular sections I need to read before I install Xubuntu to be a file server (I figure I'll try this first, and if it fails, go with freeNAS etc.)? Thanks for your optimism in how quickly I'll get it running - I'll bet anything I won't. :p

Tomorrow the new second iMac is here, and the old PC becomes mine (:D) so tomorrow will likely be spent fiddling round with my home network setup, and trying various things on the old PC. :)

ArthurS
Aug 26, 2006, 04:47 AM
If you just want to use the system as a file server, go with FreeNAS. It's only about 15MB (which means most of that 20GB will be available for data) and is by far the quickest and easiest to set up.

The entire process from downloading to a fully operational file server will take you no more than 15 minutes. That includes reading the necessary parts of the manual.

nplima
Aug 26, 2006, 11:09 AM
Thanks for your reply. The Ubuntu guide is very intimidating..


Well, It sure is big however this is a document made in the format "how do I...." all in simple english, with the reply in a format "type this on your terminal prompt". It can't get much simpler than that! :)

anyway, when you pop the Xubuntu CD in your computer, most of the work will be done automatically, so there isn't that much that can go wrong...

Lixivial
Aug 26, 2006, 11:50 AM
This is a bit of overkill for this particular situation, but for headless Linux-based servers, I find Webmin (http://www.webmin.com) to be an incredibly timesaving and wonderful resource. I don't always use it, mind, but for those servers that I may leave for 6 months+ and never touch until I need to, it does provide a nice and easy escape route should I need it.

You can connect to its port from anywhere; and if it's not open to the Internet, then from any machine on the LAN, and manage nearly any imaginable system setting and install new packages with ease. It truly is wonderful. It may be a bit of overkill in this situation, but... it can make system administration a breeze.

mikes63737
Aug 26, 2006, 11:55 AM
I have tried setting up Ubuntu as a file server before, and it is very difficult for a noob (like me) to set up a file server on Ubuntu.

sixstorm
Aug 26, 2006, 12:10 PM
I just bought a Dell PowerEdge Server from a guy for $250 shipped. I will be using it as a Linux server and learn the Linux lingo. I guess I'll be using Ubuntu to start off with and maybe switch Distros down the road a ways down . . . Ubuntu just seems to be a more user friendly environment and there is a lot of user support on the official website. Good luck with your Linux box man!

bob5820
Aug 26, 2006, 08:58 PM
I'm glad that I found this post. I plan on getting a MacPro in the next few months and then turning wy Windows box into a NAS. I started off thinking that Linux would be the way to go but FreeNAS looks interesting.

poppe
Aug 26, 2006, 11:01 PM
Does anyone know the answer to the other question the OP posted?

It was what about the Hard Drives size limit? I've heard some being restricted to 128 GB's or something like that, but does anyone know how to tell if has a limit?

tyr2
Aug 27, 2006, 05:55 AM
It was what about the Hard Drives size limit? I've heard some being restricted to 128 GB's or something like that, but does anyone know how to tell if has a limit?

It depends on the version of DMA your motherboard supports. According to this (http://en.wikipedia.org/wiki/Advanced_Technology_Attachment) wikipedia article you need support for ATA-6 or ATA/100 to get above 128Gb. Check your motherboard manual.

Alternatively you could just buy a PCI (P/S)ATA controller and use that to run the large drives from, they're pretty cheap these days.

poppe
Aug 27, 2006, 02:22 PM
It depends on the version of DMA your motherboard supports. According to this (http://en.wikipedia.org/wiki/Advanced_Technology_Attachment) wikipedia article you need support for ATA-6 or ATA/100 to get above 128Gb. Check your motherboard manual.

Alternatively you could just buy a PCI (P/S)ATA controller and use that to run the large drives from, they're pretty cheap these days.

Ooo I just might have to do this now... I'm in the same boat as OP... Pentium III 256Ram, 30 GB HD... Hmm... If I could get close to a Terabyte... and then Have it stream to my MBP... Talk about a warm feeling inside...

XIII
Aug 27, 2006, 02:37 PM
Ooo I just might have to do this now... I'm in the same boat as OP... Pentium III 256Ram, 30 GB HD... Hmm... If I could get close to a Terabyte... and then Have it stream to my MBP... Talk about a warm feeling inside...

Exactly. :D

I haven't had a chance to do mine yet - some files still need copying over before I can wipe the HD and have a go. Hopefully tomorrow I'll do it. :)

Thanks for all the others replies - I'll bear it all in mind. :)

poppe
Aug 27, 2006, 04:16 PM
Exactly. :D

I haven't had a chance to do mine yet - some files still need copying over before I can wipe the HD and have a go. Hopefully tomorrow I'll do it. :)

Thanks for all the others replies - I'll bear it all in mind. :)

Well keep us update!! And let us know (in detail, at least for me) how it all went and the process you undertook.

Goodluck.

I'm still debating on doing a linux server or just and external HD connected via Express34 or Firewire...

XIII
Aug 27, 2006, 04:18 PM
Well keep us update!! And let us know (in detail, at least for me) how it all went and the process you undertook.

Goodluck.

I'm still debating on doing a linux server or just and external HD connected via Express34 or Firewire...

Very tempted to just start now, screw the files on there. :p They're not mine.

Currently I've downloaded the freeNAS iso, and burnt it. I'll insert my Windows CD, delete the Windows partition, and then go with the freeNAS CD.. and I'll let you know exactly what I do. :) Nice to have somebody in the same boat as me, haha.

poppe
Aug 27, 2006, 04:21 PM
Very tempted to just start now, screw the files on there. :p They're not mine.

Currently I've downloaded the freeNAS iso, and burnt it. I'll insert my Windows CD, delete the Windows partition, and then go with the freeNAS CD.. and I'll let you know exactly what I do. :) Nice to have somebody in the same boat as me, haha.

Oh Crap... I dont have the windows CD anymore... hmmm...

Are you downloading the GUI and everything?

XIII
Aug 27, 2006, 05:32 PM
Oh Crap... I dont have the windows CD anymore... hmmm...

Are you downloading the GUI and everything?

Huh?

*lost*

I think with freeNAS its all on the iso? I hope? :confused:

I have backed up all files.. ready to go tomorrow.

twoodcc
Aug 27, 2006, 05:40 PM
Very tempted to just start now, screw the files on there. :p They're not mine.

Currently I've downloaded the freeNAS iso, and burnt it. I'll insert my Windows CD, delete the Windows partition, and then go with the freeNAS CD.. and I'll let you know exactly what I do. :) Nice to have somebody in the same boat as me, haha.

just so you know, i'm kinda in the same boat also, except i want to use a mac for the server. but either way, i want to know how to do it with linux also

poppe
Aug 27, 2006, 09:15 PM
Huh?

*lost*

I think with freeNAS its all on the iso? I hope? :confused:

I have backed up all files.. ready to go tomorrow.


Oh I dont know... Thats me trying to talk like I know something.... I just thought the above posters were talking you can get linux with or without a GUI and I wasn't sure if you were doing that or not.

iTwitch
Aug 28, 2006, 12:40 AM
Oh I dont know... Thats me trying to talk like I know something.... I just thought the above posters were talking you can get linux with or without a GUI and I wasn't sure if you were doing that or not.

A linux distro comes with a GUI but you can configure not to use it.

nplima
Aug 28, 2006, 09:20 AM
hey everyone,

I'm getting a bit disapointed with some of the posts on this thread... are you scared of getting your hands dirty or something? :mad:
the way I see it there's a choice to be made between:
a) buying something pre-built;
b) reviving some old computer that you have in your attic;

If there's people over here who are unwilling to read instruction manuals and prefer to spend some money instead of their precious time, fine. You're not alone, that's why there are storage appliances for sale. Here are a few: http://www.imagemrio.com.br/descricao.asp?CodProd=NSLU2&Pgn=3
http://www.ncix.com/search/?quicksearch=network+storage&minprice=Min.+Price&maxprice=Max.+Price
http://www.ebuyer.com/UK/product/108449

When you buy these, you get a kind of a blackbox, just plug it in your network and mount the drive on your computers.
So there, the non-technically inclined can now stop whining and head for the shop of their choice :p

As for the other ones, the people who really want to take advantage of some old PC they have lying around, here's what you need:
1) Xubuntu CD (www.xubuntu.org). Download and install with all default settings;
2) set up samba services: http://ubuntuguide.org/wiki/Dapper#How_to_install_Samba_Server_for_files.2Ffolders_sharing_service
3) set up shared drives with or without passwords: http://ubuntuguide.org/wiki/Dapper#How_to_share_public_folders_with_read.2Fwrite_permissions_.28Authentication.3DNo.29
4) (optional) set up remote access to the server, so you can use it without screen/keyboard: http://ubuntuguide.org/wiki/Dapper#How_to_install_SSH_Server_for_remote_administration_service
or: http://ubuntuguide.org/wiki/Dapper#How_to_configure_remote_desktop_.28not_secure.29

Now if that looks too complex, then you might want to join the "pre-built buyer" crowd - there's no shame in that. Otherwise if you're eager to learn and realise that this server is idle most of the time, have it work for you:
1) set up IMAP services: http://www.odrakir.com/blog/?p=402
2) turn the server into a media centre: http://www.linux.com/article.pl?sid=06/01/04/1855257

Enjoy! :)

XIII
Sep 2, 2006, 01:21 PM
Ok, here's what I've done:

Installed Ubuntu Linux, wiped the internal HD on the computer clean.

Now, I have fiddled around in the Terminal thing changing various settings (from that Ubuntu wiki), and I have used the sharing folder feature in the Ubuntu GUI.. and I don't know whats going wrong.

How do I connect to the share on my Mac? I have installed Samba, I believe..? I have tried doing smb://[my username (jack)]@ifconfig in Linux gives me]/UBUNTU/home/jack/test. This then gives me an authentication window sometimes, when it asks for user, password, and workgroup (I haven't set anything here have I? :confused:).. and no matter what I put I can't seem to get it to connect. Sometimes I won't even get that authentication box. FWIW, I am trying to access this from my iMacs which are wireless. The Linux box is hard wired into the router.

I am totally confused.. any simple help would be GREAT. Thank you all! :D

iTwitch
Sep 2, 2006, 02:11 PM
I'm not on my linux box now but I'll try. Is Samba running? Go to a terminal and type "ps -aux" (no quotes), do you see a process called "nmbd" or "smbd"? If yes Samba is running. Next you should check your config file (samba.conf) which should be in the /etc directory/folder. In another terminal type "man samba.conf" to see the man page which list and explains all the options.

As far as the auth window, Samba is just comparing the info you enter to what it has to determine if it should let you in. So you need to intially tell Samba who can come in - via samba.conf.

I'll probably be of more help when I'm at my linux box.

Edit: The config file is smb.conf not samba.conf and the manpage command is 'man smb.conf'

XIII
Sep 2, 2006, 05:24 PM
I'm not on my linux box now but I'll try. Is Samba running? Go to a terminal and type "ps -aux" (no quotes), do you see a process called "nmbd" or "smbd"? If yes Samba is running. Next you should check your config file (samba.conf) which should be in the /etc directory/folder. In another terminal type "man samba.conf" to see the man page which list and explains all the options.

As far as the auth window, Samba is just comparing the info you enter to what it has to determine if it should let you in. So you need to intially tell Samba who can come in - via samba.conf.

I'll probably be of more help when I'm at my linux box.

Thanks, I'll check these when I can get to it tomorrow.. The bit I'm not sure about is what I should be entering on the Mac side.. and what settings I need to have on the Samba configuration file to make that happen. I'm not too bothered about any security.

Any help would be great - thanks a lot. :)

nplima
Sep 2, 2006, 06:16 PM
Now, I have fiddled around in the Terminal thing changing various settings (from that Ubuntu wiki), and I have used the sharing folder feature in the Ubuntu GUI.. and I don't know whats going wrong.

In this case, if you prefer to have user authentication, you must use the command line instead of the GUI. you should have followed the instructions closely. ;)


How do I connect to the share on my Mac? I have installed Samba, I believe..? I have tried doing smb://[my username (jack)]@ifconfig in Linux gives me]/UBUNTU/home/jack/test. This then gives me an authentication window sometimes, when it asks for user, password, and workgroup (I haven't set anything here have I? :confused:)..

When you were following the instructions on the Ubuntu Guide Wiki, at some point you had to create a configuration file named "smbusers" with something like:

system_username = "network username"

where system username is the owner of the share on the ubuntu box (jack) and network username is the name you will be typing on the Mac. a perfectly valid choice would have been:

jack = "jack"

:)

so, if you type smb://UBUNTU (or smb://ipaddress) on your mac, you must use the "network username" as the login.

The password was set when you typed "sudo smbpasswd -a system_username". if you took note of what you did earlier you'll have a new share mounted on your desktop :)

and no matter what I put I can't seem to get it to connect.

If all else fails, start over by deleting the smbusers file, then commenting out the lines you added on the smb.conf file. If you backed up the smb.conf file before starting, revert to the original copy.

You should also ensure that the workgroup on the mac and on the ubuntu box match. ON the mac this can be set under Utilities->Directory access, while the ubuntu box will have all its config on the smb.conf file.

Good luck

Nuno

iTwitch
Sep 3, 2006, 04:22 PM
Once you get Samba set up. Launch finder on the Mac and go to menubar and click Go - Connect to Server. Now enter 'smb://192.168.1.3' (using the net address of your linux box) and click Connect. Now you should see a Select the SMB... window except the joe will be XIII, click OK. Now an Auth window should pop up, use your WORKGROUP, NAME and PASSWORD and click OK.
Finally your share will mount on the desktop. "Joe" in my case.

XIII
Sep 3, 2006, 04:56 PM
Ok.

I'm getting pretty fed up now. I deleted Samba all together, then reinstalled it. I then did the user thing, and setup my user, called "apple". Lets say password was "password". That all seemed to go through. Then I right clicked on my folder I wanted to share, called jack, chose to share it via Samba..

Then on the PC, I will go to the IP address "ifconfig" gives me.. so I type: smb:// (ip address)/home/jack

Then it asks what workgroup, I say MSHOME (thats what Ubuntu said it was on), and it asks for username and password.. I put in "apple" and "password", Now it says: "Could not connect to the server because the name or password is not correct." I tried changing the user and password.. no avail. Grrrrrrr.

Any ideas? Thanks all.

iTwitch
Sep 3, 2006, 05:13 PM
Ok.

I'm getting pretty fed up now. I deleted Samba all together, then reinstalled it. I then did the user thing, and setup my user, called "apple". Lets say password was "password". That all seemed to go through. Then I right clicked on my folder I wanted to share, called jack, chose to share it via Samba..

This folder 'jack' is that on your Mac? If so you can use finder to move stuff from jack to PC.

Then on the PC, I will go to the IP address "ifconfig" gives me.. so I type: smb:// (ip address)/home/jack

Use the finder to log in as I described.

Then it asks what workgroup, I say MSHOME (thats what Ubuntu said it was on), and it asks for username and password.. I put in "apple" and "password", Now it says: "Could not connect to the server because the name or password is not correct." I tried changing the user and password.. no avail. Grrrrrrr.

Any ideas? Thanks all.

Sounds like Samba is not configured correctly?

Did you use smbpasswd to tell Samba jack's password?
Could you post or PM your smb.conf?

XIII
Sep 3, 2006, 05:34 PM
This folder 'jack' is that on your Mac? If so you can use finder to move stuff from jack to PC.

Use the finder to log in as I described.


Sounds like Samba is not configured correctly?

Did you use smbpasswd to tell Samba jack's password?
Could you post or PM your smb.conf?

The folder 'jack' is on the Linux box - its the shared folder I'm trying to access on the Mac. I will try doing it just smb:// (ip address) - and then seeing what comes up when I next have access to it tomorrow morning.

I'll then post up my smb.conf.. it would appear that is the problem. I did use smbpasswd to tell Samba the password yes.. I followed the instructions in the Ubuntu wiki thing.

Thanks so much for your help - I'll get the info as soon as I can.

iTwitch
Sep 3, 2006, 05:42 PM
On the linux box did you:

smbpasswd -a jack (as root)

at which point you should have been prompted for a password.

I'm not crazy about GUI tools and that's how I do it from the command line.

XIII
Sep 3, 2006, 05:45 PM
On the linux box did you:

smbpasswd -a jack (as root)

at which point you should have been prompted for a password.

I'm not crazy about GUI tools and that's how I do it from the command line.

Yes, I did do that.. not sure as root though? How would I do that?

I'll post the smb.conf file up tomorrow..

iTwitch
Sep 3, 2006, 06:02 PM
When your logged in as a user you can manipulate your stuff but the system is off limits. Root however can do pretty much anything. Did you use sudo, sudo is like being root for a single command.

Anyway, to become root type 'su' at a term prompt and enter the password when prompted. But be carefull, as root you have the power to hose the system.

XIII
Sep 4, 2006, 03:04 AM
Ok, here's what has happened. I did the just the IP address, and then selected "jack" to connect to.. and then in the authentication window, put nothing but the workgroup - MSHOME. Left the other fields blank. It mounted the drive, and works well. Wierd, huh?

When I tried to switch to root, typing "su", it asked me to authenticate with my password, but always told me: "su: Authentication failure". :confused: I will post my Linux smb.conf file in just a minute.. but for now I'm a little confused. I don't neccesarily need a user or any security on this share.. but I thought I set it up with it? Hhmm. Maybe the problem does lie in the smb.conf file.

XIII
Sep 4, 2006, 03:10 AM
It wouldn't all fit in the other post.. thus this new post for part 1 smb.conf file:

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = MSHOME

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = true



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user
username map = /etc/samba/smbusers

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam

obey pam restrictions = yes

; guest account = nobody
invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
; domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
; logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
; logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @lpadmin

XIII
Sep 4, 2006, 03:11 AM
and part 2:

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
; browseable = no

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
; valid users = %S

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
; writable = yes

# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
; create mask = 0600

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

wins support = no
[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


[public]
comment = Public Folder
path = /home/public
available = yes
browseable = yes
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nobody

[jack]
path = /home/jack
available = yes
browseable = yes
public = yes
writable = yes


I hope this can help explain some of my problems! Sorry for the three simultaneous posts - I think it was needed to add so much text!

Thanks very much.

EDIT: Hhmm. I cant seem to write anything to the mounted volume - only browse. It says I dont have permission basically. I have tried changing the "security = user" to "security = share" and deleting the line about smb users.. but.. to no avail. I guess this is because of my screwed up smb.conf file again? Thanks.

nplima
Sep 4, 2006, 04:37 AM
hi again!

I regret to inform you that if you want to set this thing up properly you have to use the command line. or the GUI. not both at the same time :D
In this case use the command line. when it's done and working correctly you'll never have to touch it again.

I'd say that your smb.conf file has a few ";" too many, which has the same effect of "#", ie: a line that begins with any of these symbols is ignored when the computer reads the configuration file.
Have another look at the line that reads
"security = user" and remove the ";"
It is safest if you copy and paste the lines from the ubuntu guide into the smb.conf file instad of typing them in.

On the other hand, from what I see on your latest post, there is really no need to have authentication, is there? That's the kind of decision that should be made before starting the configuration bits :)

If all you need is a "public" folder like the one OS X sets up, for anyone to read and write without typing in passwords, then you need to follow these instructions: http://ubuntuguide.org/wiki/Dapper#How_to_share_public_folders_with_read.2Fwrite_permissions_.28Authentication.3DNo.29

iTwitch
Sep 4, 2006, 12:40 PM
Ok, here's what has happened. I did the just the IP address, and then selected "jack" to connect to.. and then in the authentication window, put nothing but the workgroup - MSHOME. Left the other fields blank. It mounted the drive, and works well. Wierd, huh?

Not really, it's probably how you configured Samba.

When I tried to switch to root, typing "su", it asked me to authenticate with my password, but always told me: "su: Authentication failure". :confused: I will post my Linux smb.conf file in just a minute.. but for now I'm a little confused. I don't neccesarily need a user or any security on this share.. but I thought I set it up with it? Hhmm. Maybe the problem does lie in the smb.conf file.

Root, it does't want jacks password it wants the root {system} password. Didn't Ubunatu ask for one? Maybe not, they might have root disabled for security and prefer you use sudo?

I'll look over your smb.conf.

XIII
Sep 4, 2006, 12:44 PM
Not really, it's probably how you configured Samba.


Root, it does't want jacks password it wants the root {system} password. Didn't Ubunatu ask for one? Maybe not, they might have root disabled for security and prefer you use sudo?

I'll look over your smb.conf.

Thanks.

Ubuntu didn't ask for one, no.. I guess its disabled. I will try some stuff mentioned in nplima's post above yours.. see how it goes. :) Let me know if you see anything in the smb.conf file.

Mechcozmo
Sep 4, 2006, 12:51 PM
hey everyone,

I'm getting a bit disapointed with some of the posts on this thread... are you scared of getting your hands dirty or something? :mad:
the way I see it there's a choice to be made between:
a) buying something pre-built;
b) reviving some old computer that you have in your attic;

I once put over 6 hours total into getting a Fedora server running. (IMAP, SMTP, Apache [with multiple domain hosting], FTP, SAMBA, and DHCP [it was to replace the home router])

Man, that was a waste of time. :mad: I had issues where every FTP user required shell access, too, which I didn't want to have happen. Anyway, I'm just leaving my Mac running as a basic FTP server and web server for now... still want to get that server to work...

iTwitch
Sep 4, 2006, 12:58 PM
EDIT: Hhmm. I cant seem to write anything to the mounted volume - only browse. It says I dont have permission basically. I have tried changing the "security = user" to "security = share" and deleting the line about smb users.. but.. to no avail. I guess this is because of my screwed up smb.conf file again? Thanks.

Writing to what? /home/public or /home/jack ? You didn't auth. as jack when you logged in so you can't write to /home/jack but /home/public should work.

"security=user" should do it, when you make a change to smb.conf you need to restart Samba for the changes to take effect.

Your almost there. :cool:

XIII
Sep 4, 2006, 01:55 PM
I did it! :D

Basically, I went through the stages on this (http://ubuntuguide.org/wiki/Dapper#How_to_share_public_folders_with_read.2Fwrite_permissions_.28Authentication.3DNo.29) to give me read/write permissions with no authentication. I got rid of all the stuff I had done in the GUI, and just went with the command prompts.. and it seems to have worked. I can mount the share, write to it, change it.. etc. :) I didn't go with sharing "public" as is said in the tutorial - rather I just shared jack. Simply changed where it says "home/public/" to "home/jack/".

Couple of small questions - is there a way to automatically mount the Share on startup? And can I rename the share somehow - it comes up as JACK in OS X.. I would prefer Jack or jack. :p And.. what about power on the old computer. Anyway to minimise its power consumption? Thanks.

Thanks so much for all of help folks.. :) Thanks for putting up with me. :) I may be back when it comes to adding more HDs.. and gigabit stuff. :D

iTwitch
Sep 4, 2006, 02:19 PM
I did it! :D

Couple of small questions - is there a way to automatically mount the Share on startup? And can I rename the share somehow - it comes up as JACK in OS X.. I would prefer Jack or jack. :p And.. what about power on the old computer. Anyway to minimise its power consumption? Thanks.


Congratulations.

Auto mount? I don't know, but I expect there is?

Mine always comes up all caps too. Never really looked into it.

Reduce power consumption, go headless and remove video card and keyboard. Before you can do that you'll need an alternate way of getting into the PC like ssh.

iTwitch
Sep 4, 2006, 02:24 PM
Just found this.

http://www.macosxhints.com/article.php?story=20031022164821984

XIII
Sep 4, 2006, 02:39 PM
Just found this.

http://www.macosxhints.com/article.php?story=20031022164821984

Thanks, I'll give it a try.. also Apple say you can add it to the startup items.. but from what I understand you will still have to click "Connect". Oh, the effort... :p

I'll have a read up on ssh.. I'm planning on eventually putting this Linux box in the garage (should be ok there, right?), or if its too.. cold or something (:confused: ) then in a small room with the router. I'll add a gigabit card, and a gigabit router.. and put a gigabit cable through to my iMac. Then, in theory, I should have faster than USB2 transfer speeds.. who knows if it will work in practise. :)

I'm sure I'll need to come back to this thread for help soon (:D), but for now, thanks a lot. I would give iTwitch and nplima rep points, if this forum supported it. :) I really appreciate it.

scottlinux
Sep 5, 2006, 09:47 AM
I would go for RedHat, do not use Fedora Core, it's a little unstable.

Biggest lie told all over the internet. Not to mention that Redhat costs money for updates. Many people use Fedora daily for desktop and a server.