Question

In: Computer Science

LAB 7.1 MANAGING USER ACCOUNTS STEP 1. Open a terminal window in linux.                               &n

LAB 7.1 MANAGING USER ACCOUNTS

STEP 1. Open a terminal window in linux.

                                       

STEP 2. Execute the correct command to display user account information (including the login shell and home directory) for the bin account.

                                       

STEP 3. Execute the correct command to display user password information (including the encrypted password and password aging) for the bin account.

                                       

STEP 4. The command in step 3 should have failed. Execute the correct su command to change your account so the command from step 3 will be successful when executed.

                                       

STEP 5. Create a new user named jake and explicitly use options to create the home directory /home/jake for this user.

                                       

STEP 6. Set a password for the jake user to a password of your choosing.

                                       

                                       

STEP 7. Run the correct command to display the default values used when a new account is created.

                                       

STEP 8. Using the less command, display the file that contains the password aging defaults.

                                       

STEP 9. Using the less command, display the file that contains the default login shell.

                                       

STEP 10. Delete the jake user and his home directory, using a single command.

Solutions

Expert Solution

STEP 1. Open a terminal window in linux.

Answer: You can do that by using the shortcut Ctrl + Alt+ T or by going to menu and finding terminal. YOu can even open terminal by right clicking and selecting terminal.   

STEP 2. Execute the correct command to display user account information (including the login shell and home directory) for the bin account.

less /etc/passwd
  • etc/passwd in Linux is a file that stores the list of users on the system along with important information regarding these users
  • less is a command that displays file contents or command output one page at a time in your terminal

                                       

STEP 3. Execute the correct command to display user password information (including the encrypted password and password aging) for the bin account.

less /etc/shadow

  • /etc/shadow file which contains the encrypted password information for UNIX / Linux user's accounts                 

STEP 4. The command in step 3 should have failed. Execute the correct su command to change your account so the command from step 3 will be successful when executed.

sudo less /etc/shadow

  • sudo (Super User DO) command in Linux is generally used as a prefix of some command that only superuser are allowed to run

                      

                                       

STEP 5. Create a new user named jake and explicitly use options to create the home directory /home/jake for this user.

useradd -m jake -d /home/jake

  • 'useradd' command is a low-level utility that is used for adding/creating user accounts in Linux OS

                                       

STEP 6. Set a password for the jake user to a password of your choosing.

passwd jake

  • passwd command in Linux is used to change the user account passwords.                              

                                       

STEP 7. Run the correct command to display the default values used when a new account is created.

useradd -D

  • useradd -D command creates a new user account using the values specified on the command line plus the default values from the system. Depending on command line option

STEP 8. Using the less command, display the file that contains the password aging defaults.

chage -l jake | less

  • chage command changes the number of days between password changes and the date of the last password change

    

             

STEP 9. Using the less command, display the file that contains the default login shell.

echo $SHELL | less

  • echo command in linux is used to display line of text/string that are passed as an argument

                                       

STEP 10. Delete the jake user and his home directory, using a single command.

userdel --remove jake

  • The userdel command modifies the system account files, deleting all entries that refer to the user name LOGIN


Related Solutions

This lab will explore the password files. a) Open a terminal window and type less /etc/passwd....
This lab will explore the password files. a) Open a terminal window and type less /etc/passwd. Which line describes the root account? b) Type ls –l /etc/passwd. Who is the owner of the passwd file? What are the permissions? c) Type less /etc/shadow. What is in the password filed for most of these accounts? d) Type ls –l /etc/shadow. Who owns this file and how do the permissions differ from the /etc/passwd file? e) Type cat /etc/default/useradd. What is the...
Linux Basics 1.In Linux what is a Window Manager –name a window manager that is commonly...
Linux Basics 1.In Linux what is a Window Manager –name a window manager that is commonly used? 2.If you were in a organisation that wanted to run a commercially backed distribution of Linux which one would you pick? 3.After the kernel is invoked at boot time, describe what happens? 4.Why is it common practice to use a boot loader? 5.Name two loaders used in Linux? 6.What is systemd? How is it used? 7.What does systemdreplace? Why was the choice made...
Section 1.0: MATLAB Fundamentals Step 1.1 Open the MATLAB application Step 1.2 In the Command Window,...
Section 1.0: MATLAB Fundamentals Step 1.1 Open the MATLAB application Step 1.2 In the Command Window, type the following: x=8 % percentage sign denotes comment y=9 % variable y set to 9 x+y % add variable x + y clear %clears the workspace window clc % clears the command window Note: the % sign indicates a user comment. In the Command Window, you should see your answer : ans=17 In the Workspace window, observe "ans", "x" and "y" Step 1.3...
PART C: PICKUP COIL Step 1: Run the PhET sim, “Faraday’s Electromagnetic Lab.” Maximize the window....
PART C: PICKUP COIL Step 1: Run the PhET sim, “Faraday’s Electromagnetic Lab.” Maximize the window. Click the Pickup Coil tab. You should see a bar magnet, a compass needle grid, and a coil attached to a light bulb. Step 2: Describe the most effective way of using the magnet and the coil to light the bulb if the coil cannot be moved. the magnet cannot be move. -------) Step 3:. Rank the arrangements and motions shown below from most...
In Linux Terminal 1. Give a command using find to search from the root directory the...
In Linux Terminal 1. Give a command using find to search from the root directory the file program.f and redirect any errors to the file myerrors.txt 2. Give a command for finding files having the letters index as the beginning of the file name and located in your home directory (provide the absolute path) 3. Give a command for finding within a directory called /mp3collection, only those mp3 files that have a size less than 5000 Kilobytes (< 5MB). 4....
o   Examine the five (5) steps to managing accounts receivable. Speculate on the step that is most...
o   Examine the five (5) steps to managing accounts receivable. Speculate on the step that is most vulnerable to fraud. Suggest at least two (2) actions that a company can take in order to protect this step from fraud. o   Imagine that your company has tasked you with developing a plan for factoring accounts receivables. Create one (1) scenario that demonstrates the key benefits and / or detriments to your company from factoring accounts receivable.
using 2 semaphores and 1 mutex: (solve in simple c++ language for linux terminal and add...
using 2 semaphores and 1 mutex: (solve in simple c++ language for linux terminal and add comments please) The barber shop has one barber (a thread), one barber chair, and n chairs for waiting customers (semaphore), if any, to sit on. If there are no customers (each customer is a thread) present, the barber sits down in the barber chair and falls asleep. When a customer arrives, he has to wake up the sleeping barber. If additional customers arrive while...
Lab 1-Refreshing Linux basics Objective: (Complete using Netlab) Please try each command in Linux system, and...
Lab 1-Refreshing Linux basics Objective: (Complete using Netlab) Please try each command in Linux system, and get screenshots (you may put multiple commands in one screenshot) which can show how actually each command runs. Also, give a brief description (one or two sentences) for each command. For the commands which have multiple switches/parameters, please try one popular switch/parameter. If after the command, there is “date”, please run date to show the system date and time before you run the command;...
1. Which of the following is not an example of a posttranslational modification? A. N-terminal amino...
1. Which of the following is not an example of a posttranslational modification? A. N-terminal amino acid(s) commonly removed or modified B. signal/targeting peptide remova l C. phosphorylation, methylation, acetylation D. Glycosylation E. All of the above are examples of posttranslational modifications 2. The major problem that arises from incorporating incorrect tautomers into a cell’s DNA is that: A. they react with adjacent bases to form dimers. B. they often lead to slippage problems during replication. C. they cannot be...
Managing Linux Servers (Apache, Samba, DNS, 1. What is the Apache directive that specifies the base...
Managing Linux Servers (Apache, Samba, DNS, 1. What is the Apache directive that specifies the base directory for configuration and log files? 2. Once you’ve modified httpd.conf, what command would make Apache reread this file, without kicking off currently connected users? 3. What directive specifies the TCP/IP port associated with Apache? 4. What ports must be open for a Samba server to work with remote systems? 6. What samba configuration steps are required for mapping a Windows user to a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT