2.1.0 Logging into the machine
Linux is a multi-user operating system. This means that many people can log into the system and use it
simultaneously. Each user is given certain permissions on what files and programs they can or can't
run, they may also have different shells, environment variables, etc.
When you connect to, or boot-up, your system you will be prompted to enter a user name and password:
Redhat 7.2
Kernel 2.4.18 on i386
host login: root
Next you will be prompted for the password for that user:
password:
After logging in you will be given a command prompt. This is where you will be entering commands
to run programs.
[root@host ~]#
2.2.0 Users
In the above login example we logged into the system as the user root. The root user is the super-user
of the system. Root generally is used to do administrative tasks on the system, install, uninstall,
and configure programs for the users. The root user can modify any of the files on the system, which is
why you should know what you are doing when using the root account. If you have your own
computer with Linux installed on it, you will have access to the root account. The password should
have been set during the installation of your distribution. The root account should rarely be
used as it can cause serious damage to the system if you are not careful.
You may be asking then, "How do I add a standard user to work with?". This can be done by using
the adduser program, while you are logged into the system as root. Simply type
adduser into the command-line. He is an example, we will add the user bob to the
system.
[root@host /home]# adduser bob
Depending on what distribution of Linux you are using the command passwd will be
run for the user that you just added. The passwd program changes the password for a
user account. If after running the adduser command, you aren't asked to change the password for the
user you will want to type in the command 'passwd <user name>' to set the
user's password. Otherwise the user can login to the machine with no password, and this is a BAD thing.
By default, usually this command will add the user to the system's password file and the
adduser command will create them a user home directory under /home/username. So if we
look at /home there should now be a directory called bob. Log out as root by typing logout
and then login as the user bob.