Question

Task 1: Using the adduser Command Execute the following commands in the root command-line environment: #...

Task 1: Using the adduser Command

Execute the following commands in the root command-line environment:

# ls /home

# adduser newuser1

# ls /home

Contrast the contents of home before and after the adduser command. ?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# cd /home/newuser1

# ls -al

# tail -n 5 /etc/passwd

What is the absolute path of newuser1's home directory?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

What is the default shell for newuser1?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# tail -n 5 /etc/shadow

Contrast the newuser1 record with your usual account record.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Execute the following commands in the root command-line environment:

Answer)

ls /home ---->After the adduser newuser1 I can see the a directory with the newuser1 same as the username is created under /home directory.

Explanation:

When we create a new user as newuser1 its home directory is by default created in the /home directory same as the user name. So before ls /home the newuser1 directory is not created but after adduser newuser1 it is created.

What is the absolute path of newuser1's home directory?

Answer)

/home/newuser1

What is the default shell for newuser1?

Answer)

bash

Explanation:

tail -n 5 displays the last 5 lines from the /etc/passwd file. The info /etc/passwd file stores are

username:passwd info:userid:groupid:gecos:absolute home directory:path and name of default shell file

newuser1:x:506:507::/home/newuser1:/bin/bash

Screenshot

tail -n 5 /etc/shadow

Contrast the newuser1 record with your usual account record.

Answer)

/etc/shadow file actually stores the password information in encrypted manner. In the screen shot we can see the encrypted password of student but we cannot see that for user newuser1. It also stored the password expiry information.

Add a comment
Know the answer?
Add Answer to:
Task 1: Using the adduser Command Execute the following commands in the root command-line environment: #...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Login to Suse Linux as root. Complete the task working as the root user. 1. What...

    Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...

  • This is done in Linux terminal. Modify the .bashrc file using command line which would add...

    This is done in Linux terminal. Modify the .bashrc file using command line which would add the following functionality to your shell upon opening a new terminal: 1. Alias called “fc” (short for “folder contents) invoking the command “ls -lah”B. Welcome message “This is demo number 7” C. Variable “semester” being equal to “Winter 2020” and print the value on screen 2. Create any directory of your choice and add it to PATH variable. 3. Show an example of local...

  • Urgent help needed: Please provide screen shots, will thumbs up good work! LANGUAGE: PYTHON Task 5:...

    Urgent help needed: Please provide screen shots, will thumbs up good work! LANGUAGE: PYTHON Task 5: Managing Groups Execute the following commands in the root command-line environment: # for i in jones sam henry john smith; do useradd $i; done Check whether users jones sam henry john smith are created # tail /etc/passwd # groupadd friends # for i in jones sam henry john smith; do gpasswd -a $i friends;done Check whether users jones sam henry john smith are added...

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

  • d to the /etc directory. Execute the following command. ls -l au*.[mn]* The output is the...

    d to the /etc directory. Execute the following command. ls -l au*.[mn]* The output is the following: -rw-r--r-- 1 root root 675 Jan 24 19:04 auto.master -rw-r--r-- 1 root root 524 Mar 22 2012 auto.misc -rwxr-xr-x 1 root root 1374 Mar 22 2012 auto.net This is exactly the output I was hoping for. What function are the [ ] performing? They look good and balance the command string. The uniquely match the m and n characters to ensure only the...

  • 1. Which one of the following commands will update the PATHEXT environment variable to include it...

    chapter 11 1. Which one of the following commands will update the PATHEXT environment variable to include its original contents plus the file extension RUN? a. SET PATHEXT-YPATHEXT%; RUN b. SET PATH+.RUN c. SETX PATHEXT5%PATHEXT%.RUN d. SETX PATH %PATHEXT%,RUN display the default command used to open a spe- cific file type? a. SETX b. ASSOC c. PATHEXT d. FTYPE 3. What command-line utility is used to display the file type linked to a specific file extension a. SETX b. ASSOC...

  • UNIX File Permission help, please answer the questions in the green boxes. Thank you Lab 03...

    UNIX File Permission help, please answer the questions in the green boxes. Thank you Lab 03 File Permissions In this lab we will: learn about file permissions learn to create symbolic links and hard links Utilities that will be utilized in this Lab: us, cd, less, cat touch, chmod id umask, mkdir, In, echo and redirection Users and Groups Linux supports several methods of controlling access to files an directories. In this lab we are going to learn the traditional...

  • Creating a Shell Interface Using Java This project consists of modifying a Java program so that...

    Creating a Shell Interface Using Java This project consists of modifying a Java program so that it serves as a shell interface that accepts user commands and then executes each command in a separate process external to the Java virtual machine. Overview A shell interface provides the user with a prompt, after which the user enters the next command. The example below illustrates the prompt jsh> and the user’s next command: cat Prog.java. This command displays the file Prog.java on...

  • In Linux 1 .Read the man pages for the following commands: man, less, cat, cd, ls,...

    In Linux 1 .Read the man pages for the following commands: man, less, cat, cd, ls, grep, and su (or sudo). Select three (3) of these and describe each in your own words. 2. Launch a GUI program, such as gedit, with and without a trailing ampersand (&). When you launch it without an ampersand, use CTRL+Z to put it into the background and see how the program reacts to mouse clicks. Use fg to return it to the foreground,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT