View the step-by-step solution to:

In many cases, a system admin may need to create many accounts at the same time, e., at the beginning of a new school year.

In many cases, a system admin may need to create many accounts at the same time, e.g., at the beginning of a new school year. Write a shell script that creates 20 user accounts, with your choice of configuration variables, except that 10 of them should be in a group called “undergrad” and 10 others in the group “csgrad”. Only for clean-up purposes for this assignment, submit a script that removes these accounts also. Note that in practice, deleting a user’s account does not happen often and should be with sufficient advance notice and caution.
Sign up to view the entire interaction

Top Answer

Hi, this is my answer.... View the full answer

addusers.sh

#!/bin/bash
groupadd undergrad
for u in $(seq 00 09); do
echo "user${u}:pwd${u}:$(expr 1000 + $u):undergrad:User Index $
{u}:/home/SI${u}:/bin/sh";
done > users.txt
sudo newusers...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online