Managing User Accounts in Lindows
Lindows, a distribution of Linux, does not require you to set up user accounts; by default you log in as the Administrator. This article explains why you should have user accounts anyway and how to manage them. Experienced Linux users can safely skip ahead to the Setting Up Accounts section.
Before you can use a Linux system, you need to log in using a user account. A user account is a record that the system keeps for each user to record system data about that user, such as the user's password. The account is linked to a user name that is unique on a Linux system. The system checks the user account data to decide whether to grant or deny each user access to files and devices on the system.
A special account called root can be found in any Linux or other UNIX-based system. The Lindows login manager calls this account Administrator. Sometimes the root account is called the Super-User account. This account has full permission over the system--it can do almost anything.
In most situation, when you are logged in using the root account you have too much power. You can delete or overwrite any file on the system and possibly make the system stop working correctly. If someone can trick you into running a program or if a virus somehow runs while you are logged in, that program then has the ability to do anything at all; it could actually take over your system. In short, running as root is dangerous.
The alternative to running as root is to run as a user. Technically, root is a user too, but usually we refer to root and users as separate entities. When you are running as a user, you greatly reduce your ability to harm your system.
Every user account has a unique user ID, a number that identifies each specific user. The root user always has a user ID of zero; other user numbers vary. When you are logged in as a user, any program you use runs under your user ID, and the system checks that user ID to decide whether the program is allowed to do certain tasks.
Each user account also has a unique user name, sometimes called the login name. For the root account this name is always root. The user name can be anything, however. I use steveha on my home system, but I could be coolguy or some other nickname. User names should be short (no more than 8 or 10 letters) and contain numbers and lower-case letters; I do not recommend the use of upper-case letters or punctuation in user names.
Each user has a directory assigned to it, the home directory, over which the user has full permissions. The user's settings are stored in configuration files, which are kept in the home directory. By convention, the home directory is in /home and has the same name as the user name. So a user named coolguy would have /home/coolguy for a home directory.
Occasionally, you may discover that something doesn't work because you don't have permission to use it. For example, if your user account doesn't have permission to use the sound card in your Linux system, you aren't able to play music. But most Linux systems, including Lindows, do a good job of setting up user accounts with the permissions they need.
Because it's dangerous to run as root all the time, there are ways to access the power of the root account while logged in as a user. For example, you can run a command shell and switch only that command shell to run as root. A command called su switches user identities for a particular command-shell session. By default, it switches to the root user, but you can also use it to switch to another user identity. For security, you need to type the account password when switching with su. su actually opens a new shell inside your original command shell, so when you exit from the su shell you find yourself back in your original command shell.
If you want to run only one command as root, you can use sudo to run a single command as another user. If your usual command shell is Bash, then this command would do exactly the same thing as the su command:
# sudo bash
Graphical versions of sudo are available, too. Most of them don't have sudo in their name, only su. KDE has kdesu, GNOME has gnomesu and there are others.
Groups add another level of security to a Linux system. A group is a set of users who collectively can be given permissions. For example, access to the sound card is controlled by a group called audio, and any user who wants to be able to use the sound card needs to be in the audio group. Each group has a unique group ID, analogous to the user ID number, and a unique name, analogous to the user name.
A Linux system can assign permissions based on user ID or group ID. Anytime more than one user might want to access a file or device, it makes sense to use group permissions. For example, at a company where many people share a Linux server, the Project X team might have a group called projectx. All members of the Project X team then are added to the projectx group. All the secret files belonging to Project X would be made accessible only to the members of the projectx group.
You can use the Lindows File Manager, which actually is a KDE program called Konqueror, to make a file accessible to the members of only one particular group. Right-click on the file in the File Manager, and choose Properties from the right-click menu. Click on the Permissions tab, and then in the Ownership box, edit the Group field to specify the desired group. Then use the Access Permissions checkboxes to make sure only members of the specified group can access the file: make sure the Group permission bits for read and write are the only ones checked.
You can make a directory accessible to members of only a single group using the same technique. For a directory, the execute permission bit controls permission to access that directory; the read bit controls permission to view the contents of the directory; and the write bit controls permission to create new files in the directory.
You can find many tutorials on the Web that outline how to manage a Linux system by using user accounts, group accounts and permission bits. Almost all of them explain how to use command-line tools to change the settings. In Lindows, however, you actually can do most management tasks from the Lindows desktop, using the User Manager and the File Manager.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide