Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need urgent help please The file/etc/passwd, which stores essential information required during login of users in a UNIX system, is composed of lines with the

image text in transcribedneed urgent help please

The file/etc/passwd, which stores essential information required during login of users in a UNIX system, is composed of lines with the following format: USERNAME : PASSWORD: UID: GID: INEO: HOME : SHELL. For instance: daemon: x:1:1: daemon:/usr/sbin:/usr/sbinologin bin: x:2:2: bin:/bin:/usr/sbinologin sys: x:3:3: sys:/dev:/usr/sbinologin sync: x:4:65534: sync:/bin:/bin/sync games: :5:60: games:/usr/games:/usr/sbinologin man: x:6:12: man:/var/cache/man:/usr/sbinologin hunter: x:1000:1000: hunter:/home/hunter:/bin/bash Write a BASH script that, given the name of a user as a command line argument (e.g., hunter), deletes the home folder of that user (HOME field) and then removes the corresponding line from the /etc/passwd file. Verify that the correct number of arguments are passed to the script. ID Domanda / Question ID: BASH

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899