> For the complete documentation index, see [llms.txt](https://mrinalghimire.com.np/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrinalghimire.com.np/assignment-1/assignment-2-questions.md).

# Assignment 2 - Questions

**Author:** Mrinal Ghimire

***

### 1. Create User Accounts

Create the following users, groups, and group memberships:

* Create a group named **testing**.
* Create a user **natasha** who belongs to **testing** as a secondary group.
* Create a user **harry** who also belongs to **testing** as a secondary group.
* Create a user **sarah** who does **not** have access to an interactive shell on the system and is **not** a member of the **testing** group.
* Set the password for **natasha**, **harry**, and **sarah** to:

```
flectrag
```

***

### 2. Create a Collaborative Directory

Create a collaborative directory named:

```
/home/admins
```

The directory must satisfy the following requirements:

* Group ownership of `/home/admins` is **testing**.
* Members of the **testing** group should have read, write, and execute permissions.
* No other users should have access to the directory (except the root user).
* Files created inside `/home/admins` should automatically inherit the **testing** group as their group owner.

***

### 3. Configure `/var/tmp/fstab` Permissions

Copy the file:

```
/etc/fstab
```

to:

```
/var/tmp/fstab
```

Configure the permissions so that:

* The owner of `/var/tmp/fstab` is **root**.
* The group owner is **root**.
* The file is **not executable** by anyone.
* User **natasha** can read and write the file.
* User **harry** cannot read or write the file.
* All other users (current and future) can read the file.

***

### 4. Configure a Cron Job

Configure a cron job for the user **natasha** that:

* Runs **every day**.
* Executes at **14:23** (local system time).
* Runs the following command:

```bash
/bin/echo hello
```

***

### 5. Create a Compressed Archive

Create a compressed tar archive named:

```
/var/tmp/tmp.tar.bz2
```

Requirements:

* The archive must contain the entire contents of the `/tmp` directory.
* The archive must be compressed using **bzip2**.

***

### Submission

Create a separate solution document containing the commands, outputs, and explanations for each task.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mrinalghimire.com.np/assignment-1/assignment-2-questions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
