Ubuntu School – What Groups Do I Belong To?

Projects
This is a quick one. If you need to figure out what groups your user account belongs to you can simply use the **groups** command from the command line: ``` kdmurray@titan:~$ groups kdmurray adm cdrom sudo dip plugdev sambashare lpadmin debian-transmission smbmedia smbbackups ccnet ``` You can also use this command to find out what groups any other users belong to. This is particularly useful when setting up new services or new network shares and you need to confirm which groups the user belongs to. ``` kdmurray@titan:~$ groups ccnet ccnet : users ccnet ``` Try to find yourself a use for the **groups** command this week!
Read More

Ubuntu School – Add an Existing User to a Group

Projects
Occasionally you need to grant an existing user some additional permissions to files, directories or applications. This typically means some kind of change in your permissions settings for the object in question. But because you can only have a single owner for a given object you need to be careful making these changes. Something you can do, though, is extend the permissions on the object to a set of users by way of a group. Logically, a group is nothing more than a named collection of users who all have the same access (by way of that group) to some resource. Users in Ubuntu typically carry one primary, and one or more secondary groups (I won't get into the differences here). By adding group permissions to your resources (ie give…
Read More

Ubuntu School – Creating a New User

Projects
There are two built-in commands for creating a user from the command-line in Ubuntu: useradd and adduser. useradd is the older command which has, for the most part, been deprecated in favour of the more user-friendly adduser command. Both will allow you to create new user accounts, set up home directories and generally move in the right direction, but adduser will prompt you for information you didn't include whereas useradd will assume you didn't want those things (ie create the home directory). ``` sudo adduser theboss ``` will produce an output similar to ``` Adding user 'theboss' ... Adding new group 'theboss' (1001) ... Adding new user 'theboss' (1001) with group 'theboss' ... Creating home directory '/home/theboss' ... Copying files from '/etc/skel' ... Enter new UNIX password: Retype new UNIX…
Read More