-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathday1
More file actions
93 lines (52 loc) · 1.2 KB
/
day1
File metadata and controls
93 lines (52 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
-Linux Administration Training
ssh based authentication: https://stackoverflow.com/questions/66452084/ssh-authentication-process
Lab1:
1) You should know the basic commands
#How to create a directory
mkdir testing
# How to go inside the directory
cd testing
#Create a empty file
touch readme
#See contents of file
cat readme
#List all file
ls
ls -ltr
ls -la
# How to come out from directory
cd ..
#Help page of any command
man cat
man ls
man mkdir
----------------
Selinux vs apparomor
https://www.techtarget.com/searchdatacenter/tip/Compare-two-Linux-security-modules-SELinux-vs-AppArmor
Lab
#udpate the pacakge list
sudo apt-get update
#Install package
sudo apt-get install apache2
#remove the package
sudo apt-get remove apache2
#Redhat/centos linux dnf
Lab 4:
sudo adduser training
#It will prompt for password.. provide any passowrd
#Login to the user
su training
#try below activty
sudo apt-get update
#It will give an error
training is not in the sudoers file
--------------------
Lab 5:
sudo vi /etc/sudoers
#Press i <insert mode>
training ALL=(ALL:ALL) ALL
#You need to press esc+:+wq+! (escape colon wq !)
#Now test
su training
sudo apt-get update
------------------