To comply with the security policy, the user account "thaslam" and its home directory were removed using the command `sudo userdel -r thaslam`. Verification was done by checking `/etc/passwd` and `/home` directory for the removal.
To achieve the task described in the lab, you can use the following commands in a Unix/Linux terminal. Ensure that you have the necessary administrative privileges to remove a user account:
# Remove the user account and home directory
sudo userdel -r thaslam
# Verify removal by viewing /etc/passwd
cat /etc/passwd
# Verify removal of home directory
ls /home
Explanation has been given below.
1. `sudo userdel -r thaslam`: This command removes the user account (`thaslam`) and the associated home directory (`-r` switch ensures removal of the home directory).
2. `cat /etc/passwd`: Displays the content of the `/etc/passwd` file, allowing you to verify that the user account has been removed.
3. `ls /home`: Lists the content of the `/home` directory to confirm the removal of the user's home directory.
Make sure to execute these commands with caution, as they involve user account removal and can have significant consequences.