programming4us
programming4us
DESKTOP

The Ubuntu Server Project (Part 2) - Web access

- 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:26:47 PM

Web access

We also want a configuration GUI, so next we'll install SWAT, which will allow us to configure Samba with a web browser. Type:

sudo apt-get install swat

This will install the package. Unfortunately, it does not by default allow you to edit any settings over the network, so we need two more commands.

sudo chmod g+w /etc/samba/smb. conf

sudo chgrp adm /etc/samba/smb. conf

The first command alters the permissions on the samba config file so that group users can change it. The second associates the 'adm' (admin) group with the same file.

The default user that you created when you installed Ubuntu server will then be able to log into SWAT and edit things.

SWAT listens on TCP port 901, so open a web browser and type:

http://IPaddressofserver:901

e.g. https://192.168.0.95:901

Obviously, you need to substitute the IP address of your server.

A pop-up box will ask you for your username and password, and then the SWAT interface should open at the home screen, which has links to all of the documentation.

Before we go any further, I should point out some of the common pitfalls with Windows/Samba network file sharing.

Workgroup, Domain and NetBIOS computer names are always upper case, entering them as lower case does not generate an error, but it will probably not work. Spaces, hyphens or other punctuation in names are not a good idea either, although underscores are okay the name is also limited to 15 characters.

Description: The CUPS printer management interface
The CUPS printer management interface

To set up the Samba server, first click on the 'Wizard' button at the top, then select 'edit parameter values'. In the screen that opens next, set the workgroup name and the server's NetBIOS name. Windows PCs use different workgroup names. Business editions usually use Workgroup, while home editions use MS-home. Samba defaults to Workgroup. On a Windows PC, right- clicking on the 'Computer' icon and selecting 'Properties' then the 'Computer Name' tab will show you the workgroup name.

My workgroup is Home-lan, and the server is called UBUSERV. In the 'security' drop-down, select 'share', then click 'Commit changes'.

Windows manages network file sharing using a browse list, which keeps track of all the resources available on the various connected PCs. By default, this list is only updated every 1 5 minutes, so changes are not always immediately available. It can be anything from one to 1 5 minutes before configuration changes take effect, so be patient. Changes to the Domain, Workgroup or NetBIOS name of the computer will need a reboot, which can be done using this command:

sudo shutdown -r now

Description: The SWAT wizard screen
The SWAT wizard screen

Description: Browsing a Samba share on a Linux PC
Browsing a Samba share on a Linux PC

Different strokes

There are several other ways to share files, all supported on Windows and OS X.

SSH

This is the simplest. It can be used to access files remotely, but it's not limited to the command line. If you're using Ubuntu, open the file browser and click on the 'file' menu. Select 'Connect to server'. In the pop-up box that opens, select 'SSH' from the drop-down menu, enter the IP address of the server and your username and password. You can then manipulate files and folders as if you were on your local desktop (note: this will only allow you to change files in the home directory of the user that you're logged in as, but it can be used as a simple method of getting files onto the server). On a Windows machine, you can do exactly the same using a program called WinSCP.

NFS

Network File system, a simple file-sharing system native to Unix OSs, but now available for Windows, because Windows 7 Pro has an NFS mount utility. Windows 7 Home editions, XP and Vista need a third-party program.

FTP

This can be set up quite easily, by installing an FTP server and using an FTP client to access it. Useful for moving things around with a minimum of fuss.

WebDAV

This is basically using a web server as a file-sharing device.

There are also other ways of running graphical tools on a headless server, as we'll see later in the series.

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