Template:U Karmic/Administration

From

Jump to: navigation, search

Contents

User Administration

  1. System -> Administration -> User Management -> Administrator Mode

Add New Users

  1. "New" button
  2. Change the "Login Name" to the desired username
  3. Click the "Passwords and Security" tab
  4. Enter the desired password

Modify Users

  1. Select the user you wish to modify
  2. Click the "Modify" button

Removing Users

  1. Select the user you wish to remove
  2. Click the "Delete" button

Change your user groups

It is quite often necessary to have extra privileges to do certain tasks. These privileges are assigned to your user by belonging to certain groups. The tasks are allowed to be performed by any user belonging to the group associated with that task.

Example: a "sudoer" is a user who can perform certain administative tasks, such as updating the system. To become a "sudoer" a user must belong to the "sudo" group.
Applications menu -> System -> User Manager -> user -> Groups --> check sudo

To become an administrator, you must belong to the adm, admin, and sudo groups. To be a virtualbox user, you must belong to the virtualbox group. To change printer settings you must belong to lpadmin. To use the cdrom, you must belong to cdrom. To use hot-pluggable devices, you must belong to plugdev. To share Samba folders (on a Windows-based network), you must belong to sambashare. To access NTFS files using the virtual filesystem fuse, you must belong to the fuse group. To use many games, you must belong to the games group. The list is long, and not always obvious.

Unfortunately, while this is the feature that gives Linux such a high-level of security, it can also take diligence to remember to add your user to certain groups. It is not uncommon for programs and functions on your system not to work merely because you don't have privileges to do so because you forgot to add your user to the appropriate group(s).

Of most importance, you must already be an administrator in order to change membership in groups. Therefore, if you create a new user and intend to give that user administrative privileges (by assigning the user to the administrative groups), you must do so from your original administrator account (the one you set up at installation) or from another administrative user account.

Timekpr (Parental controls)

Timekpr is a program to track and control the computer usage of user accounts.

  • If updating, remove any prior versions:
sudo dpkg --purge timekpr
sudo add-apt-repository ppa:nedberg
  • Install:
sudo apt-get install timekpr
When prompted which default display manager to use, select "gdm"
  • Start:
System -> Administration -> Timekpr Control Panel

Web content filtering

DansGuardian provides web filtering capability, similar to NetNanny. It is useful for limiting objectionable content in publicly accessible workstations, or for filtering objectionable content for younger users. It integrates with ClamAV, and uses several criteria for filtering websites (which is difficult to modify). It is used with Tinyproxy (best for individual users) or the Squid proxy (best for a network server). Install:

sudo apt-get install dansguardian tinyproxy
or
sudo apt-get install dansguardian squid

See these installation instructions for setup details. In brief,

  • Edit the dansguardian configuration file:
sudo nano /etc/dansguardian/dansguardian.conf
comment out the UNCONFIGURED line:
#UNCONFIGURED
If using tinyproxy instead of Squid, change the proxyport to 8888:
proxyport 8888
  • Reinstall dansguardian:
sudo apt-get install --reinstall dansguardian
  • Set your browser to use the localhost:8080 proxy. For example, in Firefox:
  • Firefox -> Edit -> Preferences -> Advanced -> Network -> Settings
  • Manual proxy configuration -> HTTP proxy: localhost -> Port: 8080

System Administration

Automating Tasks

  • Cron is a system daemon that runs tasks in the background according to instructions found in a crontab file. To edit the crontab file for the current user:
crontab -e

Tasks that normally require administrative (sudo) privileges should be added to the root user's crontab:

sudo crontab -e

Add commands using the format specified here (or see the Ubuntu Community Help). The crontab command format can also be found using:

man crontab
  • Scheduled/automated tasks (cron events) can also be edited using the GNOME schedule GUI interface.
Menu -> System -> Administration -> Task Scheduler
  • If the GNOME Schedule task scheduler is not installed, install it:
sudo apt-get install gnome-schedule

Boot Menu

Login Menu settings

You can change the Login menu settings from the GUI interface:

System -> Administration -> Advanced -> Login Manager

You can choose an integrated theme or select individual components of the login screen/process.

Automating bootup options

StartUpManager is a GUI to manage settings for Grub (Grub Legacy), Grub 2, Usplash, and Splashy.

  • Install:
sudo apt-get install startupmanager

GRUB boot manager settings

Grub2

Karmic comes with Grub2, which is a difficult boot manager to customize. (Grub2 is also known as grub-pc.) See the evolving instructions at the Ubuntu wiki or Ubuntu forums. In brief, some settings can be edited:

sudo nano /etc/default/grub
sudo update-grub
  • You can also use this command:
sudo grub-mkconfig --output=/boot/grub/grub.cfg
GRUB Legacy

The older version of GRUB ("Grub Legacy") is available, for use with a boot partition, for example. Install:

sudo apt-get install grub
  • If you have multiple operating systems (OS) on your computer, you may be using the GRUB Legacy boot manager (in a boot partition, for example). You can edit the options for GRUB Legacy in the menu.lst configuration file. (See this detailed info.)
sudo nano /boot/grub/menu.lst
(gedit can also be used instead of nano as the text editor.)
Chainloading Grub2 from Grub Legacy

To chainload Grub2 (installed in this example in the /dev/sda7 partition) from Grub Legacy, use an entry of this format in the Grub Legacy menu.lst configuration file (stored in a boot partition, for example):

title Kubuntu Karmic OS (chainloader)
rootnoverify (hd0,6)
kernel /boot/grub/core.img

Default Applications

You can choose which program to use as your default program for a specific task.

System -> Administration -> Default Applications

Kill a process

Sometimes a program (or "process") just freezes. To "kill" (or end) the program/process:

System -> Administration -> System Monitor -> highlight the errant process -> Kill process

From the command line:

sudo killall process
where process is the name of the frozen program, such as firefox.

Enabling NUM LOCK On Startup

System -> Administration -> Keyboard & Mouse -> Keyboard ->"turn on Numlock on Startup"

Working with Menus

Create an encrypted folder

You can create a folder whose contents are encrypted. See these instructions.

Create a symlink from a file to another location

A symbolic link (also known as a symlink) is a method in Linux of referring to a file (or directory) in one location from another location. Usage:

ln -s /path/to/source /path/to/destination

If /path/to/destination requires superuser rights, then use:

sudo ln -s /path/to/source /path/to/destination

This is similar to, but more powerful than, creating Shortcuts, with which former Windows users may be familiar.

Assign a root password

To be able to log in as root directly, you must assign a root password. This can be done with:

sudo passwd root

Afterwards, you can use

su

to get a root prompt. You would then use the root password.

Get a root prompt without using a root password

If you have not set a root password (or don't know it), you can obtain root user privileges anyway. From the command-line Terminal:

sudo -s
or
sudo su
or
sudo bash

You will use your own user password instead of a root password.

You could also get a prompt to become any other user on the computer by typing:

sudo su <username>

Use the File Manager as root

sudo nautilus
or
gksudo nautilus

Manually Mount and Unmount a device

To manually mount a device:

mount /dev/hda

replace /dev/hda with the location of the device.

To manually unmount a device:

umount /dev/hda

replace /dev/hda with the location of the device.

Windows Compatibility

Mounting NTFS Partitions (with read/write privileges)

Find out the name of your ntfs partition:

sudo fdisk -l

Method 1: In this example, the NTFS drive is listed by fdisk as /dev/sda2, but yours may differ.

Make a mount point for the drive:

sudo mkdir /media/WindowsNTFS

Edit fstab:

sudo nano /etc/fstab

Comment out the automatically added lines by Ubuntu installation:

#/dev/sda2  auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
#/dev/sda2 /mnt auto user,atime,noauto,rw,nodev,noexec,nosuid 0 0

and instead add the line:

/dev/sda2 /media/WindowsNTFS ntfs-3g quiet,defaults,rw 0 0

Note: There are many ways to mount the drive, depending on your needs. The fstab file controls this process. See How to edit and understand fstab and Intro to using fstab.

In this example, I indicated that the file system was an ntfs-3g filesystem, so did not use the auto option (which detects the filesystem automatically). I used rw to specify read/write privileges for all users, but umask=0 and umask=000 are accepted by some kernels.


Method 2: Edit fstab:

sudo nano /etc/fstab

When Ubuntu installation finishes, it mounts all ntfs partitions automatically with ntfsprogs, adding a line similar to the following to fstab:

UUID=8466268666267956 /media/sda1     ntfs    defaults,gid=46 0       1

Change this line to:

UUID=8466268666267956 /media/sda1     ntfs-3g    defaults,nls=utf8,locale=zh_CN.UTF-8,rw,gid=46 0       1

In this example, I have a Chinese-language Windows installation on my first partition, so I set the locale parameter (locale=zh_CN.UTF-8) so that my Chinese documents can display correctly. Setting rw (same as umask=0 or umask=000) lets me read/write the partition without sudo. gid=46 specifies that the drive will belong to the group of hot-pluggable devices (plugdev) and is not necessary unless your ntfs drive is a hot-pluggable one (such as an external USB drive). nls=utf8 is the default and is optional for most ntfs users, but there are other options for Chinese (and other specialized character-set users).

Mounting FAT32 Partitions

Follow the above instructions, but use vfat instead of ntfs-3g.

In other words, if you have made a mount point directory /mnt/WindowsFAT32 and your FAT32 drive is /dev/sda3, then edit the /etc/fstab file to include the line:

/dev/sda3 /mnt/WindowsFAT32 vfat quiet,defaults,rw 0 0

Synchronize clock to network time server

The Network Time Protocol (NTP) allows time synchronization of your computer to time servers on the Internet.To enable it:

  • Applications menu -> System Settings -> Date & Time
  • Check the "Set date and time automatically" option
  • Choose an ntp time server near you.

Printers

The new CUPS interface recognizes many printers. Specific printers not recognized can often be installed using instructions found at the Linux Foundation OpenPrinting database.

Add a Printer

System -> Administration -> Printing -> New Printer -> New Printer

Most of the time, your printer (if connected and turned on) will be detected automatically.

My network printer with its own IP address at 192.168.0.124 was correctly installed at

socket://192.168.0.124:9100.

You can also choose printers on a Windows system via Samba and other types of networked printers, in addition to directly connected printers.

Use CUPS web interface

From any web browser, go to the URL:

http://localhost:631
Personal tools
Sponsor
     Asus X200CA