Tag: samba

How to Configure SAMBA on a Linux Server
By Chris Ondo

Step By step guide to configuring SAMBA on a LINUX server.

This is for network administrators with experience configuring and administrating LINUX servers that want to know how to configure a SAMBA file server the right way step by step.

samba-logoIn this step by step tutorial I am going to show you how to make a shared folder on a linux server and share it so users on Microsoft windows workstations can access it on a local – internal network.

In this tutorial I am going to make the folder called “shared folder” and allow everybody access to the folder and printer networked to the Linux server.

This is a basic how to guide for configuring a samba workgroup file server.
I will cover how to build and configure a samba PDC – Primary domain controller in another tutorial for more experienced network administrators.

Open the samba configuration file using a unix text editor.
I like NANO since it is very easy to use.
Below are the commands I used to perform this task.

[root@localhost ~]# cd /etc
[root@localhost etc]# cd samba
[root@localhost samba]# nano smb.conf

Ok now we are in the smb.conf file
Now delete all the text in the configuration file.
Now copy and paste the below text…after that is done hit the “control and X buttons on your keyboard to exit out of the NANO text editor.
Then hit the Y button and last hit the ENTER button.
Now we are back to the command prompt and our samba configuration file is edited and saved.

workgroup = workgroup
server string = My Linux File Server
hosts allow = 192.168. 127.
log file = /var/log/samba/%m.log
security = user
netbios name = SAMBA SERVER
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

[shared folder]
comment = My Home Directory
browseable = yes
writable = yes
public = yes
read only = no

path = /var/spool/samba
public = yes
guest ok = yes
printable = yes
browseable = yes
writable = yes
read only = no

We have to create a user acct on the Linux server itself then we will create a samba user on top of the Linux user acct.

[root@localhost ~]# useradd chris
[root@localhost ~]# passwd chris
Changing password for user chris.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# smbpasswd -a chris
New SMB password:
Retype new SMB password:
getsmbfilepwent: malformed password entry (no :)
mod_smbfilepwd_entry: malformed password entry (no :)
[root@localhost ~]#

We have to start the SAMBA service.
It may already be started or it may not…so let’s check and see.

[root@localhost ~]# service smb status
smbd is stopped
nmbd is stopped
[root@localhost ~]#

The samba service is not running so let’s start it up

[root@localhost ~]# service smb start
smbd (pid 4267 4266) is running…
nmbd (pid 4271) is running…
[root@localhost ~]#

Now let’s verify the service is running

[root@localhost ~]# service smb status
smbd (pid 4267 4266) is running…
nmbd (pid 4271) is running…
[root@localhost ~]#

reboot your windows XP workstations then go to network “my network places” then go to “workgroup computers”.
You will see a computer there called “My Linux File Server”.
You can manually map a local drive letter to this folder or write a logon script the same as you would connecting to a Microsoft file server – shared folder.
Double click on that computer and you will be prompted for a user name and password.
Use the user name and password you choose in step #2
Now you will see a folder called “shared folder” You can copy and paste data to this folder just like it were a windows file server.

Chris Ondo – Central Florida Computer Engineering


Tags: , , ,

Welcome to the World of Knoppix
By Mike Ber

Knoppix is a bootable CD with a collection of GNU/Linux software, automatic hardware detection, and support for many graphics cards, sound cards, SCSI and USB devices and other peripherals. Knoppix can be used as a Linux demo, 272px-Knoppix-logo.svgeducational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk. Due to on-the-fly decompression, the CD can have up to 2 GB of executable software installed on it.

If one is to believe news from the Linux camp one could be forgiven for thinking that the world was out to destroy the beautiful thing that is the Open Source movement. Angry fingers would be pointed in several directions, surprisingly (or unsurprisingly) all in the general vicinity of Microsoft. Of course, the noises from the other side are just as loud (actually quite a bit louder). They, in turn, claim that Linux is ‘unsafe’, hard to use and even harder to maintain, and worse of all, prone to exploitation by hackers (since the source code is open source and thus can essentially be seen and played around with by anyone).

I’ve always preferred the uncomfortable seat on the fence, despite the green grass on both sides. Granted, you tend to get sore sitting in such a way after a while, but the view from here is great, and argument very clear. The battle between proprietary code (led by Microsoft, no less) and open source (Linux) has been going on ever since Linus Torvalds created Linux and started the process that has made it the genuine force that it is today. And as is the case in such fighting, there are three sides to the story: Microsoft’s tale, Linux’s woes and my bit of the story. And my part begins with the most interesting OS of them all…

What if you had an operating system that ran completely from a CD? That’s right, just one CD. And this CD also contained very useful programs for word-processing, data recovery and system repair utilities, image-editing and internet connectivity, along with excellent audio and video players? What if all you had to do was to boot from this CD and voila, in a few minutes your new OS had taken over your PC. Taken over? Nothing to worry about, as removing the OS from your computer was to be as easy as removing the CD. Literally.

300px-KNOPPIXWelcome to the world of Knoppix.

Given the fact that we are in the midst of multi-gigabyte operating systems that we there would be such a competent one that could be run entirely from a CD-ROM is stupendous. Imagine the possibilities. Customized versions of the Knoppix OS would mean that you could literally carry a streamlined version of your home PC around with you wherever you went. Need to recover data from a crashed hard-disk? Boot into Knoppix and use the system repair and data recovery tools to retrieve your data (burn it to a CD-R, or transfer it via a PC-to-PC connection) and maybe attempt to fix the disk as well. Secondly, if you are a web developer who wants to check how sites look from within a Linux environment, all you need to do is pop Knoppix in and check out your websites from Mozilla or Konqueror. Away from the office and want to work on customized software specially made for your company? Knoppix, along with a USB drive to store data, turns your crisis into a simple matter of finding a PC. And like all Linux versions, meeting the minimum system requirements (see http://www.knopper.net/knoppix/index-en.html#requirements) would be a snap (82 MB RAM, CDROM drive, SVGA card, Intel compatible CPU (i486 or better)).

Knoppix also boasts a classic boot screen


There is a lot to be said for Knoppix, especially for its appeal to Linux newbies (or ‘noobs’, as vernacular has it). With no need for an installation (although that is given as an option), and with excellent hardware detection, Knoppix has single-handedly done away with the two major concerns for Windows users wanting to try out Linux: A complicated installation process, and the problem of finding the right drivers for all your hardware. In effect, Knoppix is an excellent choice for someone who wants to try out Linux without having to go through the usual hassle. It’s easy to use, and doesn’t mess with your system either. Despite being run completely off the CD, it runs pretty quickly as well.

Knoppix also boasts a comprehensive suite of programs that has almost everything that home/office desktop could be used for. The package list is tremendous, with the compression system allowing for over 2GB of stuff to be stored. This is amazing and is certainly more than any other single live CD can hold. For a basic idea as to how you should be fine, Knoppix contains 2 office suites (Koffice and OpenOffice), has KDE, Mozilla (web+mail+IRC), PHP, MySql, samba, xmms and tons more. This is no gaming platform, but more than enough is packed in there to let you do accomplish most of your usual tasks on the PC (see http://www.distrowatch.com/table.php?distribution=knoppix for a complete list). And if you want more, do an installation and now that you can write on the hard-disk, use apt-get upgrade, apt-get dist-upgrade (after making sure your sources.list is correct) to get more.

Knoppix does have a few minor problems. These are limited to a few quirks within the KDE, some problems with hardware detection and complaints that 5 minutes to boot a PC is too long (which, by the way, is quite quick for a live-CD OS). The reality is that such problems are expected from an Open Source operating system. Linux platforms are not judged by the same criteria that Windows, or any other ‘paid-for’ OS is (this is perhaps a major reason behind the Linux-bashing that goes on in Microsoft-related circles). No one expects Knoppix to work perfectly when detecting hardware, and the fact that it more often than not works extremely well forms the basis of our judgment, whereas if Windows XP Professional refused to detect my LAN card I would not stop cursing their ineptitude (no matter that it detected everything else, or everyone else’s card). The standards applied here are totally different, and thus Knoppix survives all such criticism and continues to bathe in the afterglow of a job well done.

A few thoughts on customization. One gets a feeling that the package is perhaps too comprehensive (how many text editors do you really need?). My view is that at least for the downloadable version, there should be a way for the user to select or unselect the programs that are required. As such, one could select their favorite browser, text editor, office suite, etc. and produce a more compact installation package. Theoretically, you could also build a custom Knoppix installation that would even run your office applications (as mentioned earlier). The possibilities are great, and hopefully the Knoppix development team will take into consideration the idea of streamlining / customization, if only for the downloadable version.

So there you have it. A special flavor of Linux that offers, apart from a live-CD OS, a quite stable operating environment as well (and comes bundled with lots of goodies) that is unprecedented in terms of hardware detection. And more importantly, this could be a precursor of things to come with respect to OS development and how the industry perceives the role of an operating system, be it Linux or Windows. Maybe it’s time for diversification and specialization in the OS market, and maybe, just maybe, Microsoft is set to lose more ground as the ‘free’ operating systems get better and better.

Mike Ber is the owner of the Canadian Domain Name Portal called http://www.Every.ca. He is also a contributing author to Canadian Computer Magazine and http://www.Developer.ca website.

Buy Knoppix today!

Tags: , , , ,

Make a Linux Home Data Server of an Old PC

By Adam Knife

So, you’ve got an old computer, and you don’t know what to do with it. Sure, it can’t play new video games, maybe can’t run the latest and greatest software, don’t fret, it’s not totally worthless. Converting your old computer in to a home data server opens a range of possibilities, and a range of new things you can do with your computer(s) and the network.

So, how do you do it? Well, if it’s already set up for Windows Networking, you’ve got the basics set up for a Windows file server, and can simply use your local area network for transfering/working with files, however, this article is going to show you the more effective, and more powerful way: setting up a Linux file server.

The first step is to pick a Linux distro, DistroWatch.com lists the most popular distributions, and reviews a range of ubuntuimagesdistributions, we’re going to use the Ubuntu [5.10] operating system, with a server installation, simply because it’s the operating system this author uses for his desktop, and is quickly becoming the most popular distribution around.

Your old computer likely has enough memory, and a powerful enough CPU to run Ubuntu, however, if you intend to use this server as a major central file server, it will likely need a new hard-drive. You can deal with that on your own.

When you insert the Ubuntu CD, and boot to it, instead of just pressing [enter] at the boot screen, type ‘server’ then press enter – this will prevent it from installing any of the *-desktop packages, and not setting up any unneeded applications.

After following the steps of installation, you will be prompted with a logon screen – enter the username and password you provided during installation, and you are in your brand new Linux system. From here, you can do everything from browse the web, to set up the computer for various networking tasks, to play a range of Linux-based games.

Package management is a critical part of running a Linux system, luckily Ubuntu comes with two distinct and useful tools to aid in your package managing. Aptitude [which, is actually just a UI for apt-get] and apt-get.

A package called “samba” will allow you to set up proper networking between Linux and Windows computers (at least, we hope you’ve got your networking issues sorted out). Running “sudo apt-get install samba” in your new command line will tell the apt-get application to install the samba package, and set it up with default settings.

Once samba is installed, you’ll want to set it up to share certain files/directories, and set them up on your network – samba networking is a massive topic of it’s own, and way beyond the scope of this article, however, running “man samba” will give you the samba manual file, which lists off a series of other manuals to look at. Google’s always helpful too. :)

Now, once you have networking and samba set up, you should be able to transfer files between Windows and Linux through Network Neighborhood/smbclient – you’ve now got a basic data server set up. That was easy, wasn’t it?

For those who want to go further, Pure-FTPd will allow you to set up a fully featured FTP (file transfer protocol) server on this box, which you could use to access your files remotely from any computer set up with an FTP client (Windows Explorer has one built in!), setting up an Apache based web-server is fairly simple with Ubuntu’s apt-get packages, and OpenSSH allows the user to remotely log in to the Linux shell from any computer equipped with an SSH client.

A slight advancement to this system could allow you to set up Bash scripts combined with cron would allow you to set up scripts which immediately backup files every X days, or scripts to do certain processing to files at certain times – the possibilities are effectively endless.

Adan X. Knife is a computer scientist, entrepreneur and web developer. He currently runs a network of websites including one about High Definition Technology and a Free Games Library. He also runs a range of communication related sites including his cellular phone reviews site.

Tags: , , , , , ,
Back to top