Soru
QUESTION FIVE (20 MARKS) a) User management in Linux is done by using Linux administration commands write a command for each of the following user management task (5 marks) i) Adds a user ii) Disable a user iii) Delete a user iv) Add a user to a user group v) Gives information on all logged in user b) State FIVE features of Linux operating systems (5 marks) c) As a system administrator of an IT firm, describe how you would create a Shell Script in Linux environment (5 marks) d) Using appropriate commands show how you can change permissions under Linux
Çözüm
4.4209 Voting
Merve
Kıdemli · 11 yıl öğretmeniUzman doğrulaması
Cevap
a) User management in Linux is done by using Linux administration commands. Here are the commands for each of the following user management tasks:<br /><br />i) Adds a user: `sudo useradd username`<br />ii) Disable a user: `sudo usermod -S username`<br />iii) Delete a user: `sudo userdel username`<br />iv) Add a user to a user group: `sudo usermod -aG groupname username`<br />v) Gives information on all logged in user: `who | grep 'name'`<br /><br />b) Five features of Linux operating systems are:<br />1. Open-source: Linux is an open-source operating system, which means that its source code is freely available for anyone to view, modify, and distribute.<br />2. Security: Linux is known for its strong security features, such as built-in firewall, secure network protocols, and regular security updates.<br />3. Customizability: Linux allows users to customize their operating system according to their needs. Users can choose from a variety of desktop environments, window managers, and themes.<br />4. Stability: Linux is known for its stability and reliability. It can run on a wide range of hardware platforms and can handle multiple tasks simultaneously without crashing.<br />5. Community support: Linux has a large and active community of users and developers. This means that there are many resources available for Linux users, such as documentation, forums, and support groups.<br /><br />c) As a system administrator of an IT firm, to create a Shell Script in Linux environment, I would follow these steps:<br />1. Open a text editor, such as nano or vim, and create a new file with a.sh extension.<br />2. Add the necessary commands to the file, using the syntax of the shell scripting language.<br />3. Save the file and make it executable using the `chmod` command.<br />4. Run the script by typing `./scriptname.sh` in the terminal.<br /><br />d) To change permissions under Linux, you can use the `chmod` command. Here are some examples:<br /><br />1. To change the permissions of a file: `chmod permissions filename`<br />2. To change the permissions of a directory: `chmod permissions directoryname`<br />3. To change the ownership of a file: `sudo chown newowner filename`<br />4. To change the group ownership of a file: `sudo chgrp newgroup filename`<br />5. To change the permissions of a file for a specific user: `sudo chmod permissions username:filename`
Derecelendirmek için tıklayın: