Vk 36 Tuntitehtävät

1.    Find a suitable package and install Nethack.

-sudo apt-get install nethack-x11

-I installed this packet because just install nethack didn´t work

2. Create a user group and two new users. Add the new users to the new group. Give also the other user permission to use sudo.

-sudo addgroup ryhma1

-sudo adduser user1

-sudo adduser user2

-sudo  usermod -aG ryhma1,sudo user1

-sudo usermod -aG ryhma1,sudo user2

usermod -aG
3. Do other users have permission to list contents of your home directory?

-only me and the sudo users
4. Create a new file (touch command is handy). What permissions of the file in number
format?

– 664

touch luonti
5. What means that a directory has only x permission?

-You can see the directory but you can´t see it or change it

6. Write a shell script that prints Hello world

-First I used Nano editor and wrote the script.

shell script Hello World
7. How can you run a command once a week?

-crontab file, activate crontab with command crontab -e

-then write the cron: 30  0  *  *  5  /bin/updatedb (where every Friday 00:30 system executes given command)

 

 

Leave a comment