Monday 2 March 2015

Week 5 Lab 15

TASK 1:

In this task we used the linux machine command line to create two different groups sesame street and Simpsons and then create users within them groups. We then added passwords to the created users and viewed the users encrypted hash on the shadow file.


The shadow file with the hash value

1. What is the command to add a group to the system in Linux?

groupadd 'groupname'

2. What is the command to give a user a password in Linux?

passwd 'username' then write the password twice.

3. What is the command to add a user to the system in Linux?

useradd 'username' -g 'groupname'

4. Where is the user’s encrypted password hash stored on a Linux system?

cat /etc/shadow



TASK 2:

In this task we used the command line to login with a different user, not with the root user and seeing what the user has access to. We logged in with moleman and couldn't access comicbookguy's information. However when we logged into comicbookguy's account  and made the other users of the same group able to access (write read and execute) some information. We then went into moleman's account  and accessed comicbookguy's location within the system.


This shows comic book guy naming his account read write and execute accessible 


1. What is the command to give the group read and write permissions for the comicbookguy folder, within the home directory using symbolic permissions?

chmod g+rw comicbookguy

2. What is the command to give others read permissions for the comicbookguy folder, within the home directory using symbolic permissions?

chmod o+r comicbookguy


3. What is the command to take away the read permissions for group for the comicbookguy folder, within the home directory using symbolic permissions?

chmod g-r comicbookguy


4. What is the command to take away the read and execute permissions for the others for the comicbookguy folder, within the home directory using symbolic permissions?

chmod o-rx comicbookguy



TASK 3:

In this task we used the number syntax called absolute permissions to add read write and execute options on the user account to the other users on the system and not just the ones in the group.




1. What is the command to give the user, group, and others read and write permissions for the comicbookguy folder, within the home directory using absolute permissions?

chmod 666 comicbookguy

2. What is the command to give the user, group, and others read permissions for the comicbookguy folder, within the home directory using absolute permissions?

chmod 444 comicbookguy

3. What is the command to give read and execute permissions the user, group, and others for the comicbookguy folder, within the home directory using absolute permissions?

chmod 555 comicbookguy

4. What is the command to give read, write, and execute permissions the user, group, and others for the comicbookguy folder, within the home directory using absolute permissions?

chmod 777 comicbookguy


No comments:

Post a Comment