Hands on: Get connected with Ubuntu Linux

Add and remove user privileges and set up a network connection to a remote server

Written by Barry Shilliday, Personal Computer World

We've been doing a series on Ubuntu Linux, in which I have explained how to get DVDs and other video formats playing, and set up Evolution, the email and groupware program. Now, we’ll look at user privileges and network connections.

When you install and set up Ubuntu, you may notice there’s no need to enter a root (super-user) password. When we’ve performed administration tasks through the graphical tools the desktop has asked for our user password, and when we’ve performed similar tasks at the command line we’ve run the ‘sudo’ command and had to provide the same.

Ubuntu does not permit access to the root account by default. There are many reasons for this, primarily security. Using the root account can be dangerous; a wrong command can wipe your hard drive.

Advertisement

Running as root also removes all the system’s file security; you can overwrite and change any file. Trojan virus developers would be happy if people used root blindly more often, but luckily it’s rarely necessary.

Ubuntu implements sudo for super-user access, a program that temporarily provides full access to a restricted set of users. To gain that access, the user must enter their own password as if they were logging into the desktop.

This is what’s happening when you click to update the system, for example – in the background sudo is authenticating you for super-user access, and a window pops up to do that.

At the command line, if you prefix any command with ‘sudo’ you will run that command as root.

For example, ‘rm file.txt’ will attempt to delete a file as your user, while ‘sudo rm file.txt’ will attempt to remove the file as if you had first logged in as root. Super-user access is required for any modifications to the system; be it configuring the network or installing the latest security updates.

To prevent you having to enter your password too often, the access is made available for a certain period of time. Once you enter your password at the prompt, you can run another command with sudo without entering your password, so long as it’s in the same terminal window.

Not every user has access to sudo. When you install the system, the user you initially add is given sudo privileges; this is necessary since there’s no access to root directly, so there would be no way otherwise to perform administration tasks. You can add and remove sudo access for others by using the user manager.

User management

Ubuntu provides a graphical tool for manipulating users. Select ‘Users and Groups’ from the administration menu and click ‘add’, or ‘properties’ with a user selected. A window pops up ( see screen 1 ) where you can fill in or change the user’s details.

At the top you will see three tabs. The Advanced tab lets you select a user profile. These are fairly basic, but future versions of Ubuntu should allow precise desktop setups for different kinds of users.

In the third tab you can control a user’s privileges ( see screen 2 ). By using Unix groups, Ubuntu lets you control who can access what. For example, the ‘audio’ group provides access to the computer’s sound hardware, so access is granted by being a member of that group.

That’s what happens behind the scenes, but the graphical user tool simplifies this by presenting a list of privileges you can tick. A standard user has access to everything except sudo: tick or untick the ‘Executing system administration tasks’ option to grant or remove access to sudo.

As the administrator of your computer you will want access, but other users shouldn’t. Create these users without this privilege and apart from this they’ll be able to use the computer fully. For the ultra-cautious, you may want to create a day-to-day user for yourself without sudo access, though this will mean having to log in as another user to perform tasks such as updating the system.

It is possible to provide normal root access in Ubuntu, but I’d recommend against it. By using sudo you only use super-user privileges when necessary, which is a good habit to get into.

No standard tasks require the use of a root login; however, if you’re executing a long series of commands as root, you may wish to gain temporary access to a root shell. This can be done using sudo – just run the following:

$ sudo -s

Enter your password and the shell will now be logged in as root. This is identical to using ‘su -’ on a traditional Linux system, but this method doesn’t require a super-user password. If you still wish to enable the root account for direct login you must set a password – run ‘sudo passwd root’ to do this.

Reader comments

More from Computeractive

News

The latest home computing news

Downloads

The best PC tools, applications and more

Reviews

Independent opinions on new hardware and software

Step-by-step guides

Easy-to-follow projects with pictures

PC Help

Solve PC problems with our Q&A

Videos

PC projects demonstrated and product reviews

Articles

An in-depth look at how to get the best from your PC

Magazine

What's coming up in Computeractive

Forums

Get help with your PC problems from our readers

Competitions

Your chance to win computing prizes

Shopping

Great deals on products, services and more

Computeractive Back Issue CD-Rom 12
All 26 issues of Computeractive from 2009 on one CD-Rom.

Ultimate Guide to Free Computing
Find out how you can get free software, services and more!

Learn to use Windows 7
Learn to use Windows 7
Everything you need to know about using Windows 7!

Computeractive - Issue 280Computeractive Back Issues
Missed an issue? Click here to find a back issue

Blogs

Windows Watch

Windows Watch

Keeping an eye on the latest XP and Vista news

Norton Smartphone Security for Android: First Photos

Exclusive first photos of Symantec's Smartphone Security for Android, taken at Symantec's headquarters. Story here .

Download Junkie

Download Junkie

Your daily dose of download discussion

It's live! Get AVG Anti-Virus 9, worth £26.99, FREE for one day only!

Probably our biggest giveaway for a while, we're offering you the full current AVG Anti-Virus 9 [1-PC, 1-Year], worth £26.99, completely FREE...

Advertisement

Free email newsletters

Techno babble demystified...

[Display all definitions]

Or type in any computer-related word and click "Go"

Advertisement

Computeractive is not reponsible for content of Google adverts

Primary Navigation

© Incisive Media Investments Limited 2010, Published by Incisive Financial Publishing Limited, Haymarket House, 28-29 Haymarket, London SW1Y 4RX, are companies registered in England and Wales with company registration numbers 04252091 & 04252093

Search computeractive.co.uk
opfine.com - markets sentiment analysis