Developer Forums | About Us | Site Map
Search  
HOME > TUTORIALS > SERVER SIDE CODING > ADMINISTRATION TUTORIALS > WINDOWS TO LINUX ROADMAP: PART 4 USER ADMINISTRATION


Sponsors





Useful Lists

Web Host
site hosted by netplex

Online Manuals

Windows-to-Linux roadmap: Part 4 User Administration
By Chris Walden - 2004-06-17 Page:  1 2 3 4

Passwords, groups, and their shadows

Administering users in Linux is both very similar to and very different from administering Windows users. Both systems are multi-user, and control access to resources is based on user identity. Both systems allow collecting users into groups so that access control can be done more easily without having to touch many users for each change. From there, the two systems begin to diverge.

The super user

In Linux, the Super User is called root. The root user can control every process, access every file, and perform any function on the system. Nothing can ever be hidden from root. Administratively speaking, root is the supreme being. It is, therefore, very important that the root account be protected by having a secure password. You should not use root for day-to-day tasks.

Other users can be given root privileges, but this should be done with care. Usually you will configure specific programs to be run as root by certain users, rather than granting broad root access.

Creating new users

New users can be created either from the console line, or using a tool such as Webmin.

The command to add a user is useradd. For example, to create a new user from the console:

useradd -c "normal user" -d /home/userid -g users\
-G webadm,helpdesk -s\ /bin/bash userid

This command creates a new user called "userid," the last parameter in the command. A comment is entered that says "normal user." Userid's home directory will be "/home/userid." Userid's primary group will be users, but userid will also be placed in the "webadm" and "helpdesk" groups. Userid will use the "/bin/bash" shell as the normal console environment.

Using Webmin, creating a new user is easy and visual. Log into Webmin with your favorite browser, and go to the System section. Select the "Users and Groups" tool, and then click Create a new user.

Figure 1. Webmin's Create User screen
Figure 1. Webmin's Create User screen

Fill in the details for the user, and click Create. The user will be created.

Adding users with GUI system tools is also covered in "Basic tasks for new Linux developers."



View Windows-to-Linux roadmap: Part 4 User Administration Discussion

Page:  1 2 3 4 Next Page: Changing passwords

First published by IBM developerWorks


Copyright 2004-2024 GrindingGears.com. All rights reserved.
Article copyright and all rights retained by the author.