Question

Step 3: How would you write this script in C? It needs to do the things required in step 3.

1. You have received a new batch of distinguished users; their basic information is located in newusers.tar. Inside of the tar file, there is a file called newusers.txt which contains a colon-separated entry for each user: the username, the uid, the GECOS information, and the users preferred shell. Also in the tar file you will find a public key for each of these users in the subdirectory pubkeys/ 2. Please add a test user to the newusers.txt with a public key for whom you also have the corresponding private key (i.e., use ssh-keygen to create a new key pair.) 3. Please add these users to your Debian machine as 1 al users (you might want to verify that no name clashes occur, though, before you proceed!) You must write a ogram to do this addition: do not add these users by hand. Your program should create home directories on your Debian box with the usual files from /etc/skel, but put the home directories in /home/users/USERNAME/, not just /home/USERNAME. Each user should have his own group, where the group id matches the user id. Dont assign passwords to these accounts; instead, set it up so that the users can login using the public key provided in the tar fi Also, create a /scratch/USERNAME/ directory for each user, and make sure that it is owned by the correct user and has the correct group number. 5. Finally, after you have installed these users with your program, verify that you can ssh into the test users account, and test that all permissions and directories are set up correctly for that user. My advice for the program is to use a scripting language; most people find using /bin/bash adequate, though writing this program in Python or Perl (or Lua, or C, or Gauche, or Racket, or Cloiure, or AWK, or...) is more pleasant

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Step 3: How would you write this script in C? It needs to do the things...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Unix Debian System Create a script with the following functionality: a.    (3 points) The script takes...

    Unix Debian System Create a script with the following functionality: a.    (3 points) The script takes a list of users from standard in. Note: this implies the script will be executed as   follows: cat /root/users | ./script.bash and the file that contains a list of users is a list with a one user per line b.    (3 points) Before removing each user, you need to ensure the user exists (hint: use this $(cat /etc/password | egrep “^$username”) and see if...

  • 3. As a system admin, on your Ubuntu server, you are asked to complete these tasks:...

    3. As a system admin, on your Ubuntu server, you are asked to complete these tasks: • Create these directories: documents, data, bin so that every user added will automatically have these directories in their home directory • Add a new user with username as jdoe and full name jane doe, and create the home directory for the user at the same time • Assign a password jdoe1234! to that user • Set the password to expire after 60 days...

  • 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...

  • Cybersecurity Fundamentals Lab #9: Access ControlName: ____________________ If your Kali VM is already up and running,...

    Cybersecurity Fundamentals Lab #9: Access ControlName: ____________________ If your Kali VM is already up and running, login to the root account on the VM via ssh. It does not matter whether you use a command line or GUI sshclient. If your VM is not currently up, use the vSphere web client to start your VM before logging into it via ssh.1: Create an Unprivileged User For some labs, including this one, we will need a non-root user account on the...

  • Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using...

    Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using the cat command, create a file named classRoster with the following fields, separated by a comma. Student ID First Name Last Name Grade Program of Study ASURITE ID (username) Add three records to your file. Display the contents of the file. Move the file classRoster to the directory Activity1. Go to the Activity1 directory. Display the directory you are in. Add read, write and...

  • Language: C++ PLEASE INCLUDE SCREENSHOT OF OUTPUT In this assignment, you will consider the problem of organizing a collection of computer user-ids and passwords. Each time a user logs in to the syste...

    Language: C++ PLEASE INCLUDE SCREENSHOT OF OUTPUT In this assignment, you will consider the problem of organizing a collection of computer user-ids and passwords. Each time a user logs in to the system by entering his or her user-id and a secret password, the system must check the validity of this user-id and password to verify that this is a legitimate user. Because this validation must be done many times each day, it is necessary to structure this information in...

  • Language: C++ Write a program that will allow the instructor to enter the student's names, student...

    Language: C++ Write a program that will allow the instructor to enter the student's names, student ID, and their scores on the various exams and projects. A class has a number of students during a semester. Those students take 4 quizzes, one midterm, and one final project. All quizzes weights add up to 40% of the overall grade. The midterm exam is 25% while the final project 35%. The program will issue a report. The report will show individual grades...

  • What if you had to write a program that would keep track of a list of...

    What if you had to write a program that would keep track of a list of rectangles? This might be for a house painter to use in calculating square footage of walls that need paint, or for an advertising agency to keep track of the space available on billboards. The first step would be to define a class where one object represents one rectangle's length and width. Once we have class Rectangle, then we can make as many objects of...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

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