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...
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...
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...
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...
1) Open a new terminal. a) Use the runlevel command. What is the current run level...
1) Open a new terminal. a) Use the runlevel command. What is the current run level of your system? b) Use the command ls /usr/lib/system/system . What does this show? c) Use the command ls /etc/rc.d. What does this show? d) Use the command ls/etc/rc.d/init.d. What SysV daemons are available on your system? e) Type init 3 and press Enter. The type runlevel. What is the most recent runlevel? f) Type init 1 and press enter. Does the runlevel command...
UNIX/LINUX LAB (1) Review the sample shell program (tryShell.c), and compile/run the program (tryShell) with the...
UNIX/LINUX LAB (1) Review the sample shell program (tryShell.c), and compile/run the program (tryShell) with the following commands, and at the end, use CTRL+C to terminate the program: ls ls -l tryShell* date whoami hostname uname -a ctrl+C    (2) Run the program (tryShell) with "time -p" with a few commands: time -p ./tryShell (3) Edit the program (tryShell.c) so that it will exit (terminate the program) when the input command string is "exit" try shell.c code at bottom //////////// #include...
Directions 1. Start up IDLE3.8 and open a scripting window. 2. Write a program to solve...
Directions 1. Start up IDLE3.8 and open a scripting window. 2. Write a program to solve the following problem: functions - The program should input 3 integers, do calculations and print results. You need to write 4 functions for average, smallest, largest and middle as well as writing a main(). Use the main() for input, calling functions and output. Enter a number...6 Enter a number...2 Enter a number...11 Average = 6.33 Smallest = 2 Largest = 11 Numbers in order...
This code needs to be in C++, please. Step 1: Add code to prompt the user...
This code needs to be in C++, please. Step 1: Add code to prompt the user to enter the name of the room that they are entering information for. Validate the input of the name of the room so that an error is shown if the user does not enter a name for the room. The user must be given an unlimited amount of attempts to enter a name for the room. Step 2: Add Input Validation to the code...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT