|
|
(6 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
− | '''Linux – Basics of System Administration'''
| + | {| border=1 |
− | | + | !Time |
− | | + | !Narration |
− | | + | |
− | {| style="border-spacing:0;" | + | |
− | | style="border-top:0.05pt solid #000000;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| <center>'''Time'''</center>
| + | |
− | | style="border:0.05pt solid #000000;padding:0.097cm;"| <center>'''Narration'''</left>
| + | |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:02
| + | | 00:02 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Hello and welcome to the Spoken Tutorial on Basics of System Administration in Linux. | + | | Hello and welcome to the Spoken Tutorial on '''Basics of System Administration''' in '''Linux'''. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:09
| + | | 00:09 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this tutorial we will learn the followings. | + | | In this tutorial, we will learn the following. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:13
| + | | 00:13 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| adduser
| + | | adduser su |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:14
| + | | 00:16 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| su | + | | usermod userdel |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:16
| + | | 00:18 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| usermod | + | | id du |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:17
| + | | 00:20 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| userdel | + | | df |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:18
| + | | 00:22 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| id | + | | I am using '''Ubuntu 10.10''' for this tutorial. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:19
| + | | 00:27 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| du | + | | As a prerequisite please go through the spoken tutorial on '''General Purpose Utilities in Linux''' |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:20
| + | | 00:35 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| df | + | | which is available on this website. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:22
| + | | 00:39 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I am using Ubuntu 10.10 for this tutorial. | + | | One must have "admin" access in order to execute the commands shown. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:27
| + | | 00:47 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| As a prerequisite please go through the spoken tutorial on “General Purpose Utilities in Linux” | + | | Let us first learn how to create a new user. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:35
| + | | 00:53 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| which is available on this website | + | | The "adduser" command will create a new user login for us along with authentication. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:39 | + | | 01:01 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| One must have admin access in order to execute the commands shown. | + | | We can add any user account with the help of “sudo” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:47 | + | | 01:06 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us first learn how to create a new user. | + | | Let me give you a brief explanation about the “sudo” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 00:53 | + | | 01:11 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The “adduser” command will create a new user login for us along with authentication. | + | | "Sudo" command allows the administrative user to execute a command as a '''super''' user. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:01
| + | | 01:19 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We can add any user account with the help of “sudo” command. | + | | The "sudo" command has many options. We will learn about the options as we go further in this tutorial. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:06
| + | | 01:27 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me give you a brief explanation about the “sudo” command. | + | | Lets now learn how to create a “New User”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:11
| + | | 01:32 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Sudo command allows the administrative user to execute a command as a super user. | + | | Open the “Terminal” by pressing the keys “Ctrl, Alt and t” simultaneously on your keyboard. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:19
| + | | 01:45 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The sudo command has many options. We will learn about the options as we go further in this tutorial. | + | | I have already invoked the “Terminal” here. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:27
| + | | 01:49 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Lets now learn how to create a “New User”. | + | | Here, type the command “sudo space adduser” and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:32
| + | | 01:58 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Open the “Terminal” by pressing the keys “Ctrl, Alt and t” simultaniously on your keyboard | + | | You will be prompted for a password. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:45 | + | | 02:01 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I have already invoked the “Terminal” here. | + | | I will give the “Admin” password here and Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:49 | + | | 02:07 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Here type the command “sudo space adduser” and press Enter. | + | | The typed password on the terminal is not visible. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 01:58 | + | | 02:11 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You will be prompted for a password. | + | | So we have to type the password carefully. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:01
| + | | 02:16 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I will give the “Admin” password here and Enter. | + | | Once done, a message “adduser: Only one or two names allowed” is displayed. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:07
| + | | 02:27 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The typed password on the terminal, is not visible. | + | | So, let us create a new user account named “duck”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:11
| + | | 02:34 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| So we have to type the password carefully. | + | | Type the command: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:16
| + | | 02:36 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Once done, a message “adduser : Only one or two names allowed” is displayed. | + | | '''sudo space adduser space duck''' and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:27
| + | | 02:45 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| So let us create a new user account named “duck”. | + | | We have created a new user called “duck”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:34
| + | | 02:49 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Type the command : | + | | In the process of creating a new user, a separate “home” directory for that user has also been created. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:36
| + | | 02:58 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| sudo space adduser space duck, and press Enter. | + | | Please note that we will be prompted for a new password for the user “duck”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:45 | + | | 03:05 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We have created a new user called “duck”. | + | | Type the password of your choice. In my case, I am going to type “duck” as the password and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:49 | + | | 03:17 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In the process of creating a new user, a seperate “home” directory for that user has also been created. | + | | Please type the new password again. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 02:58 | + | | 03:20 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please note that we will be prompted for a new password for the user “duck”. | + | | The password is asked twice for security reasons and for confirmation. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:05
| + | | 03:26 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Type the password of your choice, in my case im going to type “duck” as the password and press Enter. | + | | Now our password for the new user is updated. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:17
| + | | 03:31 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please type the new password again. | + | | We will be asked for other details too. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:20
| + | | 03:35 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The password is asked twice for security reasons and for confirmation. | + | | But for the time being, I will enter only the “Full Name” as “duck” and leave the rest of the details blank by pressing the Enter key. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:26
| + | | 03:46 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now our password for the new user is updated. | + | | Enter. I will confirm this by entering “y”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:31
| + | | 03:51 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We will be asked for other details too. | + | | This is to confirm that all the information is correct. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:35
| + | | 03:55 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| But for the time being, I will enter only the “Full Name” as “duck” and leave the rest of the details blank by pressing the Enter key. | + | | Let us now check if the user account has been created. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:46 | + | | 04:00 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Enter. | + | | To do this, please type at the command prompt: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:47 | + | | 04:04 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I will confirm this by entering “y”. | + | | “ls space /(slash) home” |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:51 | + | | 04:09 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This is to confirm that all the information is correct. | + | | and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 03:55 | + | | 04:11 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us now check, if the user account has been created. | + | | To show the list of users in the home folder, “ls” command is used. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:00
| + | | 04:17 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To do this, please type the at the command prompt | + | | And here is our newly created user named “duck”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:04
| + | | 04:23 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “ls space /(slash) home” | + | | Let me switch back to the slides. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:09
| + | | 04:26 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| and press Enter. | + | | Now, the next command is the “su”, |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:11
| + | | 04:30 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To show the list of users in the home folder “ls” command is used. | + | | “su” stands for “Switch User”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:17
| + | | 04:34 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| And here is our newly created user named “duck”. | + | | This command is useful for switching from the current user to another user. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:23
| + | | 04:39 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me switch back to the slides. | + | | Let us go to the Terminal now. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:26
| + | | 04:43 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now the next command is the “su” | + | | Enter the command: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:30
| + | | 04:45 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “su” stands for “Switch User”. | + | | “su space hyphen space duck” on the “Terminal” and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:34
| + | | 04:53 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This command is useful for switching from the current user to another user. | + | | You will be prompted for a password. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:39
| + | | 04:56 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us go to the Terminal now. | + | | I shall type the user “duck's” password here. Please recall that it was “duck” itself. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:43 | + | | 05:04 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Enter the command | + | | Please notice that, the Terminal switches from the previous user to the new user which is “duck” in our case. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:45 | + | | 05:14 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “su space hyphen space duck” on the “Terminal”and press Enter. | + | | To logout from this user, type |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:53 | + | | 05:17 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You will be prompted for a password. | + | | “logout” and hit Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 04:56 | + | | 05:22 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I shall type the user “duck's” password here please recall that it was “duck” itself. | + | | Now the terminal logs out from the current user “duck” and comes back to the previous user account which is “vinhai” in our case. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:04
| + | | 05:31 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please notice that, the Terminal switches from the previous user to the new user, which is “duck” in our case. | + | | Let us learn about the “usermod” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:14
| + | | 05:35 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To logout from this user, type | + | | The “usermod” command |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:17
| + | | 05:37 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “logout” and hit Enter. | + | | enables a '''super''' user or '''root''' user to modify the settings of other user accounts such as: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:22
| + | | 05:46 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now the terminal logs out from the current user “duck” and comes back to the previous user account, which is “vinhai” in our case. | + | | Change the password to no password or empty password. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:31
| + | | 05:50 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us learn about the “usermod” command. | + | | Show the date on which the user account will be disabled. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:35
| + | | 05:55 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The “usermod” command | + | | Let us try this command and see. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:37
| + | | 05:57 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Enables a super user or root user to modify the settings of other user accounts such as | + | | Let me switch to the terminal now. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:46
| + | | 05:59 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Change the password to no password or empty password. | + | | Let me show you how to set a date of expiry for the user account "duck". |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:50 | + | | 06:05 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Show the date on which the user account will be disabled. | + | | Here, at the command prompt, type: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:55 | + | | 06:09 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us try this command and see. | + | | '''sudo space usermod space -(hyphen)e space 2012-(hyphen)12-(hyphen)27 space duck''' |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:57 | + | | 06:33 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me switch to the terminal now. | + | | and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 05:59 | + | | 06:37 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me show you how to set a date of expiry for the user account duck. | + | | The user account expiry date is set as mentioned in the command here with the help of the option “-e”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:05
| + | | 06:46 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Here at the command prompt type | + | | Now you have set an expiry date for the user account “duck”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:09
| + | | 06:52 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| sudo space usermod space -(hyphen)e space 2012-(hyphen)12-(hyphen)27 space duck | + | | Let us now talk about the “uid” and “gid” commands. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:33
| + | | 06:57 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| and press Enter. | + | | “id – command” is used to check the identities of all the users and groups. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:37 | + | | 07:04 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The user account expiry date is set as mentioned in the command here with the help of the option “-e”. | + | | To know about the identity of the user, we use “id space -(hyphen)u”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:46 | + | | 07:12 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now you have set an expiry date for the user account “duck”. | + | | To know about the identity of the group users, it is “id space -(hyphen)g” |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:52 | + | | 07:20 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us now talk about the “uid” and “gid” commands. | + | | Now lets work on this. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 06:57 | + | | 07:22 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “id – command” is used to check the identities of all the users and groups | + | | At the terminal, let us type |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:04
| + | | 07:25 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To know about the identity of the user, we use “id space -(hyphen)u”. | + | | “id” and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:12
| + | | 07:29 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To know about the identity of the group users, it is “id space -(hyphen)g” | + | | Now we can see the User IDs and Group IDs on the system that we are using. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:20
| + | | 07:37 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now lets work on this. | + | | To get only the user id, we use “-(hyphen)u” option. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:22
| + | | 07:43 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| At the terminal, let us type | + | | Let us type the command, “id space -(hyphen)u” |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:25
| + | | 07:49 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “id” and press Enter. | + | | and press Enter. Now we can see only the 'ids' of the users. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:29
| + | | 07:55 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we can see the User IDs and Group IDs on the system that we are using | + | | But what if we need to know the names of the users? |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:37 | + | | 08:00 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To get only the user id, we use “-(hyphen)u” option. | + | | To find that out, we will type |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:43 | + | | 08:02 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us type the command, “id space -(hyphen)u” | + | | “id space -(hyphen)n space -(hyphen)u” on the terminal here and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:49 | + | | 08:13 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| and press enter. | + | | Now we can see the names of the users instead of their ids. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:50 | + | | 08:20 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we can see only the ids of the users. | + | | Let us now learn the commands for Group IDs. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 07:55 | + | | 08:24 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| But what if we need to know the names of the users? | + | | Lets type “ id space -(hyphen)g”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:00
| + | | 08:29 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To find that out, we will type | + | | Here we can see the group ids. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:02
| + | | 08:32 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “id space -(hyphen)n space -(hyphen)u” on the terminal hereand press Enter. | + | | If we want to view all the current user's group IDs, type: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:13
| + | | 08:38 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we can see the names of the users instead of their ids. | + | | “id space -(hyphen) (capital)G” and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:20
| + | | 08:46 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us now learn the commands for Group IDs. | + | | Please notice that I have typed G in capital letter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:24
| + | | 08:50 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Lets type “ id space -(hyphen)g”. | + | | See the result for yourself. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:29
| + | | 08:53 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Here we can see the group ids. | + | | Now let us learn how to delete a user account. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:32
| + | | 08:57 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| If we want to view all the current user's group IDs, type | + | | For this we use “userdel” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:38 | + | | 09:00 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “id space -(hyphen) (capital)G” and press Enter. | + | | We can delete an user account permanently with the help of the “userdel” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:46 | + | | 09:07 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please notice that I have typed G in capital letter. | + | | Let's try this on the terminal. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:50 | + | | 09:09 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| See the result for yourself. | + | | Here, type: “sudo space userdel space -(hyphen)r space duck”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:53 | + | | 09:22 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us learn how to delete a user account. | + | | I have used the "-(hyphen)r" option. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 08:57 | + | | 09:25 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| For this we use “userdel” command. | + | | This is to remove the '''user''' along with his '''home directory'''. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:00
| + | | 09:30 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We can delete an user account permanently with the help of the “userdel” command. | + | | Let us press Enter and see what happens. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:07
| + | | 09:34 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Lets try this on the terminal. | + | | Now the user “duck” has been deleted. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:09
| + | | 09:38 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Here type “sudo space userdel space -(hyphen)r space duck”. | + | | Check this by typing: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:22
| + | | 09:41 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I have used the -(hyphen)r option. | + | | “ls space /(slash)home” and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:25
| + | | 09:47 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This is to remove the user along with his home directory. | + | | We will find that the user account “duck” has been deleted. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:30
| + | | 09:53 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us press Enter and see what happens. | + | | Let me go back to the slides now. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:34
| + | | 09:56 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now the user “duck” has been deleted. | + | | Some of the useful commands in Linux System Administration are “df” and “du”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:38 | + | | 10:03 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Check this by typing | + | | The “df” command gives a report on the free space available on the disk. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:41 | + | | 10:08 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “ls space /(slash)home” and press the Enter. | + | | And the “du” command gives a report on how much space a file has occupied. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:47 | + | | 10:13 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We will find that, the user account “duck” has been deleted. | + | | Please try these two commands and find the output for yourself as an assignment. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:53 | + | | 10:19 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me go back to the slides now. | + | | Let us shift to the terminal. I shall show you a few useful options used with the “df” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 09:56 | + | | 10:26 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Some of the useful commands in Linux System Administration are “df” and “du” | + | | Please type: '''df space -(hyphen)h''' and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:03
| + | | 10:33 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The “df” command gives a report on the free space available on the disk. | + | | Here, it shows the size of the Filesystem, and the space used. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:08
| + | | 10:38 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| And the “du” command gives a report on how much space a file has occupied. | + | | It also shows the space mounted on in a human readable format. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:13
| + | | 10:46 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please try these two commands and find the output for yourself as an assignment. | + | | Let us now try some options with the “du” command. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:19
| + | | 10:50 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us shift to the terminal, I shall show you a fewuseful options used with the “df” command. | + | | At this point I assume that you have created some text files in your home folder. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:26
| + | | 10:57 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please type df space -(hyphen)h and press Enter. | + | | If not, please refer to the tutorial on “General Purpose Utilities in Linux”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:33 | + | | 11:04 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Here it shows the size of the Filesystem, and the space is used. | + | | I have already created some text files in my '''home directory''' to execute the commands. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:38 | + | | 11:11 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| It also shows the space mounted on in a human readable format. | + | | Go to “home folder” on the terminal by typing |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:46 | + | | 11:15 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us now try some options with the “du” command | + | | “cd space /(slash) home” and press Enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:50 | + | | 11:20 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| At this point i assume that you have created some text files in your home folder. | + | | Then type: du space -(hyphen)s space *. (asterisk dot) txt and press enter. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 10:57 | + | | 11:33 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| If not please refer to the tutorial on “General Purpose Utilities in Linux”. | + | | This command will give you a report on the 'txt files' available in the directory along with its file sizes. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:04
| + | | 11:43 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| I have already created some text files in my home directory to execute the commands. | + | | As an assignment, at the command prompt please type: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:11
| + | | 11:47 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Goto “home folder” on the terminal by typing | + | | “du space -(hyphen)ch space *.(asterisk dot)txt” and see what happens. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:15
| + | | 11:59 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “cd space /(slash) home” and press Enter. | + | | Let me go back to the slides. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:20 | + | | 12:01 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Then type du space -(hyphen)s space *. (astrix) dot txt and press enter. | + | | To summarize, we have learnt: |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:33 | + | | 12:03 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This command will give you a report on the txt files available in the directory along with its file sizes. | + | | “adduser” command to create a new user. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:43 | + | | 12:06 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| As an assignment, at the command prompt type | + | | “su” command to switch from one user to another user. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:47 | + | | 12:09 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “du space -(hyphen)ch space *.(astrix dot)txt” and see what happens. | + | | “usermod” command to change the user account settings. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 11:59 | + | | 12:12 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me go back to the slides. | + | | “userdel” command to delete the user account. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:01
| + | | 12:15 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To summarise, we have learnt: | + | | "id" command to know the information about user ids and group ids. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:03
| + | | 12:20 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “adduser” command to create a new user. | + | | “df” command to check the file system size and its availability. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:06
| + | | 12:24 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “su” command to switch from one user to another user. | + | | “du” command to check the space occupied by a file. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:09
| + | | 12:27 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “usermod” command to change the user account settings. | + | | This brings us to the end of this tutorial on “Basics of system administration”. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:12 | + | | 12.33 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “userdel” command to delete the user account. | + | | The video available at this url, |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:15
| + | | 12:37 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| id command to know the information about user ids and group ids. | + | | Summarizes the Spoken Tutorial project. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:20
| + | | 12:40 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “df” command to check the file system size and its availability. | + | | If you do not have good bandwidth, you can download and watch it. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:24
| + | | 12:44 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| “du” command to check the space occupied by a file. | + | | We conduct workshops using spoken tutorials. We also give certificates to those who pass an online test. Please contact us for more details. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:27
| + | | 12:53 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This brings us to the end of this tutorial on “Basics of system administration”
| + | | Spoken Tutorial is a part of the “Talk to a Teacher” project Supported by the National Mission on Education through ICT (NMEICT), MHRD, Government of India. |
− | | + | |
− | |-
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12.33
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The video available at this url,
| + | |
− | | + | |
− | |-
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:37
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Summarises the Spoken Tutorial project.
| + | |
− | | + | |
− | |-
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:40
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| If you do not have good bandwidth, you can download and watch it.
| + | |
− | | + | |
− | |-
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:44
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We conduct workshops using spoken tutorials. We also give certificates to those who pass an online test. Please contact us for more details.
| + | |
− | | + | |
− | |-
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 12:53
| + | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Spoken Tutorial is a part of the “Talk to a Teacher” project | + | |
− | | + | |
− | Supported by the National Mission on Education through ICT (NMEICT), MHRD, Government of India. | + | |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 13:03
| + | | 13:03 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| More information is available on this url | + | | More information is available on this url. |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 13:08
| + | | 13:08 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This script has been contributed by ----------------------(name of the translator) | + | | This script has been contributed by ----------------------(name of the translator) |
| | | |
| |- | | |- |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 13:12
| + | | 13:12 |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off. Thanks for watching. | + | | and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off. Thanks for watching. |
| | | |
| |} | | |} |
Time
|
Narration
|
00:02
|
Hello and welcome to the Spoken Tutorial on Basics of System Administration in Linux.
|
00:09
|
In this tutorial, we will learn the following.
|
00:13
|
adduser su
|
00:16
|
usermod userdel
|
00:18
|
id du
|
00:20
|
df
|
00:22
|
I am using Ubuntu 10.10 for this tutorial.
|
00:27
|
As a prerequisite please go through the spoken tutorial on General Purpose Utilities in Linux
|
00:35
|
which is available on this website.
|
00:39
|
One must have "admin" access in order to execute the commands shown.
|
00:47
|
Let us first learn how to create a new user.
|
00:53
|
The "adduser" command will create a new user login for us along with authentication.
|
01:01
|
We can add any user account with the help of “sudo” command.
|
01:06
|
Let me give you a brief explanation about the “sudo” command.
|
01:11
|
"Sudo" command allows the administrative user to execute a command as a super user.
|
01:19
|
The "sudo" command has many options. We will learn about the options as we go further in this tutorial.
|
01:27
|
Lets now learn how to create a “New User”.
|
01:32
|
Open the “Terminal” by pressing the keys “Ctrl, Alt and t” simultaneously on your keyboard.
|
01:45
|
I have already invoked the “Terminal” here.
|
01:49
|
Here, type the command “sudo space adduser” and press Enter.
|
01:58
|
You will be prompted for a password.
|
02:01
|
I will give the “Admin” password here and Enter.
|
02:07
|
The typed password on the terminal is not visible.
|
02:11
|
So we have to type the password carefully.
|
02:16
|
Once done, a message “adduser: Only one or two names allowed” is displayed.
|
02:27
|
So, let us create a new user account named “duck”.
|
02:34
|
Type the command:
|
02:36
|
sudo space adduser space duck and press Enter.
|
02:45
|
We have created a new user called “duck”.
|
02:49
|
In the process of creating a new user, a separate “home” directory for that user has also been created.
|
02:58
|
Please note that we will be prompted for a new password for the user “duck”.
|
03:05
|
Type the password of your choice. In my case, I am going to type “duck” as the password and press Enter.
|
03:17
|
Please type the new password again.
|
03:20
|
The password is asked twice for security reasons and for confirmation.
|
03:26
|
Now our password for the new user is updated.
|
03:31
|
We will be asked for other details too.
|
03:35
|
But for the time being, I will enter only the “Full Name” as “duck” and leave the rest of the details blank by pressing the Enter key.
|
03:46
|
Enter. I will confirm this by entering “y”.
|
03:51
|
This is to confirm that all the information is correct.
|
03:55
|
Let us now check if the user account has been created.
|
04:00
|
To do this, please type at the command prompt:
|
04:04
|
“ls space /(slash) home”
|
04:09
|
and press Enter.
|
04:11
|
To show the list of users in the home folder, “ls” command is used.
|
04:17
|
And here is our newly created user named “duck”.
|
04:23
|
Let me switch back to the slides.
|
04:26
|
Now, the next command is the “su”,
|
04:30
|
“su” stands for “Switch User”.
|
04:34
|
This command is useful for switching from the current user to another user.
|
04:39
|
Let us go to the Terminal now.
|
04:43
|
Enter the command:
|
04:45
|
“su space hyphen space duck” on the “Terminal” and press Enter.
|
04:53
|
You will be prompted for a password.
|
04:56
|
I shall type the user “duck's” password here. Please recall that it was “duck” itself.
|
05:04
|
Please notice that, the Terminal switches from the previous user to the new user which is “duck” in our case.
|
05:14
|
To logout from this user, type
|
05:17
|
“logout” and hit Enter.
|
05:22
|
Now the terminal logs out from the current user “duck” and comes back to the previous user account which is “vinhai” in our case.
|
05:31
|
Let us learn about the “usermod” command.
|
05:35
|
The “usermod” command
|
05:37
|
enables a super user or root user to modify the settings of other user accounts such as:
|
05:46
|
Change the password to no password or empty password.
|
05:50
|
Show the date on which the user account will be disabled.
|
05:55
|
Let us try this command and see.
|
05:57
|
Let me switch to the terminal now.
|
05:59
|
Let me show you how to set a date of expiry for the user account "duck".
|
06:05
|
Here, at the command prompt, type:
|
06:09
|
sudo space usermod space -(hyphen)e space 2012-(hyphen)12-(hyphen)27 space duck
|
06:33
|
and press Enter.
|
06:37
|
The user account expiry date is set as mentioned in the command here with the help of the option “-e”.
|
06:46
|
Now you have set an expiry date for the user account “duck”.
|
06:52
|
Let us now talk about the “uid” and “gid” commands.
|
06:57
|
“id – command” is used to check the identities of all the users and groups.
|
07:04
|
To know about the identity of the user, we use “id space -(hyphen)u”.
|
07:12
|
To know about the identity of the group users, it is “id space -(hyphen)g”
|
07:20
|
Now lets work on this.
|
07:22
|
At the terminal, let us type
|
07:25
|
“id” and press Enter.
|
07:29
|
Now we can see the User IDs and Group IDs on the system that we are using.
|
07:37
|
To get only the user id, we use “-(hyphen)u” option.
|
07:43
|
Let us type the command, “id space -(hyphen)u”
|
07:49
|
and press Enter. Now we can see only the 'ids' of the users.
|
07:55
|
But what if we need to know the names of the users?
|
08:00
|
To find that out, we will type
|
08:02
|
“id space -(hyphen)n space -(hyphen)u” on the terminal here and press Enter.
|
08:13
|
Now we can see the names of the users instead of their ids.
|
08:20
|
Let us now learn the commands for Group IDs.
|
08:24
|
Lets type “ id space -(hyphen)g”.
|
08:29
|
Here we can see the group ids.
|
08:32
|
If we want to view all the current user's group IDs, type:
|
08:38
|
“id space -(hyphen) (capital)G” and press Enter.
|
08:46
|
Please notice that I have typed G in capital letter.
|
08:50
|
See the result for yourself.
|
08:53
|
Now let us learn how to delete a user account.
|
08:57
|
For this we use “userdel” command.
|
09:00
|
We can delete an user account permanently with the help of the “userdel” command.
|
09:07
|
Let's try this on the terminal.
|
09:09
|
Here, type: “sudo space userdel space -(hyphen)r space duck”.
|
09:22
|
I have used the "-(hyphen)r" option.
|
09:25
|
This is to remove the user along with his home directory.
|
09:30
|
Let us press Enter and see what happens.
|
09:34
|
Now the user “duck” has been deleted.
|
09:38
|
Check this by typing:
|
09:41
|
“ls space /(slash)home” and press Enter.
|
09:47
|
We will find that the user account “duck” has been deleted.
|
09:53
|
Let me go back to the slides now.
|
09:56
|
Some of the useful commands in Linux System Administration are “df” and “du”.
|
10:03
|
The “df” command gives a report on the free space available on the disk.
|
10:08
|
And the “du” command gives a report on how much space a file has occupied.
|
10:13
|
Please try these two commands and find the output for yourself as an assignment.
|
10:19
|
Let us shift to the terminal. I shall show you a few useful options used with the “df” command.
|
10:26
|
Please type: df space -(hyphen)h and press Enter.
|
10:33
|
Here, it shows the size of the Filesystem, and the space used.
|
10:38
|
It also shows the space mounted on in a human readable format.
|
10:46
|
Let us now try some options with the “du” command.
|
10:50
|
At this point I assume that you have created some text files in your home folder.
|
10:57
|
If not, please refer to the tutorial on “General Purpose Utilities in Linux”.
|
11:04
|
I have already created some text files in my home directory to execute the commands.
|
11:11
|
Go to “home folder” on the terminal by typing
|
11:15
|
“cd space /(slash) home” and press Enter.
|
11:20
|
Then type: du space -(hyphen)s space *. (asterisk dot) txt and press enter.
|
11:33
|
This command will give you a report on the 'txt files' available in the directory along with its file sizes.
|
11:43
|
As an assignment, at the command prompt please type:
|
11:47
|
“du space -(hyphen)ch space *.(asterisk dot)txt” and see what happens.
|
11:59
|
Let me go back to the slides.
|
12:01
|
To summarize, we have learnt:
|
12:03
|
“adduser” command to create a new user.
|
12:06
|
“su” command to switch from one user to another user.
|
12:09
|
“usermod” command to change the user account settings.
|
12:12
|
“userdel” command to delete the user account.
|
12:15
|
"id" command to know the information about user ids and group ids.
|
12:20
|
“df” command to check the file system size and its availability.
|
12:24
|
“du” command to check the space occupied by a file.
|
12:27
|
This brings us to the end of this tutorial on “Basics of system administration”.
|
12.33
|
The video available at this url,
|
12:37
|
Summarizes the Spoken Tutorial project.
|
12:40
|
If you do not have good bandwidth, you can download and watch it.
|
12:44
|
We conduct workshops using spoken tutorials. We also give certificates to those who pass an online test. Please contact us for more details.
|
12:53
|
Spoken Tutorial is a part of the “Talk to a Teacher” project Supported by the National Mission on Education through ICT (NMEICT), MHRD, Government of India.
|
13:03
|
More information is available on this url.
|
13:08
|
This script has been contributed by ----------------------(name of the translator)
|
13:12
|
and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off. Thanks for watching.
|