programming4us
programming4us
DESKTOP

The Ubuntu Server Project (Part 1)

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
8/2/2012 3:25:39 PM

Last week, we installed and carried out basic configuration of an Ubuntu server; this week we'll be setting it up as a file server. There are several ways to do this, but we shall be concentrating on the most commonly used system for home servers, Windows file and printer sharing.

You need this if you want to share files and printers with Windows PCs. It's also often used for file-sharing between home networks of Linux PCs.

Also known as SMB or CIFS, the open-source equivalent is called Samba and is a full client/server stack, which runs on Linux, BSD, and OSX among others. There's even a version for the Amiga.

There are several problems with implementing what is essentially a Windows file system on Linux.

Samba is, if you like, an 'overlay' on top of the Linux file system, which maps Windows users, passwords and permissions to Linux ones. This is needed because Windows and Linux handle users and file permissions differently, so Linux and Samba users are separated. That said, a correctly configured Samba server will function perfectly well as a Windows file server. It can even be used as a domain controller, servicing login authentication for a whole Windows network.

Description: File server
File server

Getting started

We start with the Ubuntu server install from last week.

Description: Connecting to a Linux server from a Linux PC using SSH
Connecting to a Linux server from a Linux PC using SSH

After booting the server and logging in, we need to install Samba. This can be a complex task, but luckily help is at hand in the form of a program called tassel. The tassel command allows you to install 'tasks', which are bundles of packages from the apt repositories with all of their configuration files and interconnections preset. It is installed in Ubuntu server by default, but if you're following these articles with a desktop version of Ubuntu, you will have to install it with: sudo apt-get install tasksel

To run it, we type: sudo tasksel

You need to enter your password, and after a few moments, the tasksel menu appears. You will probably notice that it looks very like the package selection screen that we saw during server installation, and it's the same screen, but it has many more options. To install our Samba server, we need to move the cursor to the relevant position, press Space to select it, then press Tab to move to 'OK' and hit Enter, whereupon all the required software will be installed and configured. You can optionally select the print server bundle, which will install CUPS. CUPS are the Common UNIX Printing System, and although it's freely available, it's actually funded by Apple and is the print engine for OS X.

What you need

Load factor: 0.05- 0.99

Packages required: Samba server, SWAT

Command count: 7

The fine print

To install printers, you will need to use CUPS, which has its own web interface running on port 631, accessed by typing 'https: // ipaddressofserver: 631’.

Like SWAT, it's locked down and only accessible from the machine it is installed on by default. (You may find yourself thinking 'Are Linux users a teensy bit paranoid?' The answer is yes, but these tools are really designed for corporate networks.). We need to edit the cupd. Coif file to allow access from the local network. Again, we use the Nano editor:

sudo nano /etc/cupsd.conf

You need to change several lines. First find this section:

# only listens for connections from the local machine.

Listen localhost:631

Listen /var/run/cups/cups.Sock

Change it to (insert the IP address of your own server:

#Listen for connections from the local network.

Listen 192.168.0.95:631

Listen /var/run/cups/cups. sock

Edit the following sections by adding Allow@LOCAL to allow remote administration, so that they look like this:

# restricts access to the server...

<Location />

Order allow,deny Allow @LOCAL

</Location>

# restricts access to the admin pages...

<Location /admin>

Order allow, deny Allow @LOCAL

</Location>

# Restrict access to configuration files... <Location /admin/conf> AuthType Default Require user @SYSTEM Order allow,deny Allow @LOCAL </Location>

Save the changes with Ctrl+O, Enter to confirm, and Ctrl+X to exit. Then restart CUPS: sudo cups restart

Log in via a web browser with https://192.168.0.95:63. Note: For security reasons, CUPS won't allow logins from users without passwords. The CUPS web interface is fairly straightforward, and can be used to add, configure and share local or network printers.

Unfortunately, it would need another article to encompass all of the different printer types and connection methods, but there's good information on the internet for most printers. www.cups. org is a good starting point, as is the Linux Foundation's open printing page at tinyurl .com/72obv3z.

Other  
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
REVIEW
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
programming4us
 
 
programming4us