Ceci est une ancienne révision du document !
Add Users to Groups in Ubuntu 11.10
Amongst the mixed bag of 'features' in Ubuntu 11.10 is the lack of a proper user and group admin tool. We had one in 11.04, you could do anything with user and group permissions from a graphical interface. Easy.
Come 11.10, that goes away and all you can do is add or remove user accounts or change the account type (Standard or Administrator). Try setting up VirtualBox and Samba shares and see how far you get. If you want to add new or existing users to existing groups, it is impossible to do from the user account management dialog box.
Canonical, you just made a large number of us resort to a command line. Again. How 'very Linux'. Anyway, back in the geek ghetto, let's move on…
Open a Terminal (Ctrl-Alt-T keyboard shortcut). The command to list all existing groups on your system is:
groupmod
but press the TAB KEY 3 TIMES, not Enter;
The command to add an existing user to an existing group follows the format:
sudo usermod -a -G GROUPNAME USERNAME
Replace <Groupname> with the required group name and <Username> with an account name. For example:
sudo usermod -a -G samabashare robin
It's one of those command lines that doesn't give feedback.
To verify success, run the command:
cat /etc/group
The username should appear in all groups of which the user is a member.
Ubuntu 12.04 really should find a way to restore the missing utility.
Oh! It turns out there is… Curiously, if you search the Software Center, or run the command:
sudo apt-get install gnome-system-tools
You can still find the gnome-system-tools package containing the old User Account Admin tool!
Fix 'Untrusted Packages' Error in Ubuntu 11.10
If you've added PPAs (Personal Package Archives) to your software sources in Ubuntu, you may find you get an error when you try to run updates in the Update Manager:
‘Requires installation of untrusted packages’
This is typically owing to missing GPG keys for those PPAs so that Update Manager can't verify those updates. It will simply refuse to install those updates. It is easy to fix.
Open a Terminal session and run the command
sudo apt-get update
The PPAs that are being refused will show up having no public key
Take note (perhaps copy and paste from the terminal using shift-control-C to copy) those 16-digit hexadecimal key numbers appearing after ‘NO_PUBKEY’.
To fix this, get the public key value, import it into your list of software sources, then re-verify those sources.
You can then use the update command below to verify your software sources list, approving those PPAs for updates:
sudo apt-get update
Update Manager should now run to completion without this error.
Disable Guest Login
If you're sociable and you like having guests in your house, or indeed, logged onto your computer, skip over this. If you have a need to lock out casual visitors to your machine, then you'll want to ditch the guest login that came by default with Ubuntu 11.10.
'Guest' became a default on the login list with the LightDM login manager in 11.10 and I just want to take it out of the login list.
This is easy enough if you're using the default LightDM in Ubuntu 11.10. Edit the LightDM configuration file /etc/lightdm/lightdm.conf, with root privilege:
sudo gedit /etc/lightdm/lightdm.conf
In the section SeatDefaults and add the line 'allow-guest=false' in the manner of:
[SeatDefaults] greeter-session=unity-greeter user-session=ubuntu allow-guest=false
Save the document.
LightDM needs a restart, or you can use a terminal command
sudo restart lightdm
which will return to your login screen where the guest account is disabled. Save and close anything else that's running first!
If you're still using GDM (which was the default in previous Ubuntu releases), it's a package removal, you have to uninstall gdm-guest-session.
Home Folder Encryption
How paranoid are you about theft or the sensitivity of your personal and business data? You may want to consider encrypting your Home folder.
The Ubuntu 11.10 installer, offers to securely encrypt the Home folder; put the check in the box for this during the install.
On first login, you will be prompted for an encryption passphrase to your private home folder. You may as well allow the encrypt-fs software to generate your pass phrase, it will generate a strong pass phrase consisting of at least 32 uppercase and lowercase letters, numbers, white spaces and special characters.
Unlike ordinary passwords you will never enter it directly yourself; it generates a 128-bit (16 character) hash key. Store this in a safe and secure place, it is the key to recovering the data from your Home folder if you ever have to manually recover.
If you don't choose this option during Ubuntu 11.10 installation, you can easily do it later by installing ecryptfs-utils, which is in the Ubuntu Software Center or by running the terminal command
sudo apt-get install ecryptfs-utils
After installing this package you should be able to select “Encrypt Home Folder” from the right-click menu in Nautilus. The command
sudo ecryptfs-migrate-home -u USERNAME
will encrypt the home folder for the specified username.
Software Sources Public Key Errors
Results of an apt-get update run on my 11.10 system recently:
Fetched 632 B in 1s (430 B/s)
Reading package lists… Done
W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 52A794126E3AB2D3
W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8771ADB0816950D8
To install the missing public keys, run the command for each missing key, replacing my example with your key value:
sudo apt-key adv –recv-key –keyserver keyserver.ubuntu.com 52A794126E3AB2D3
You should get a result looking something like this:
robin@D6400:~$ sudo apt-key adv –recv-key –keyserver keyserver.ubuntu.com 52A794126E3AB2D3
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /tmp/tmp.xoyVBC269z –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –recv-key –keyserver keyserver.ubuntu.com 52A794126E3AB2D3
gpg: requesting key 6E3AB2D3 from hkp server keyserver.ubuntu.com
gpg: key 6E3AB2D3: public key “Launchpad Recent Notifications” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)