WEBVTT - This file was automatically generated by VIMEO

0
00:00:14.300 --> 00:00:15.500
Hey, welcome back to this video.

1
00:00:16.400 --> 00:00:19.200
So in this video we are going to learn how to

2
00:00:19.200 --> 00:00:22.200
 set up a Samba server. So in case you do

3
00:00:22.200 --> 00:00:25.100
 not know what is Samba server, it is

4
00:00:25.100 --> 00:00:28.700
 basically a protocol which is used to transfer

5
00:00:28.700 --> 00:00:31.500
 files between a Linux and

6
00:00:31.500 --> 00:00:34.200
 a Windows computer. Now in this video.

7
00:00:34.200 --> 00:00:38.200
 We are going to see how to set up your own Samba server

8
00:00:37.200 --> 00:00:40.900
 onto a Linux operating system through

9
00:00:40.900 --> 00:00:43.500
 which you can share your files

10
00:00:43.500 --> 00:00:46.700
 as well as all your directories to any operating

11
00:00:46.700 --> 00:00:49.200
 system like Windows or Mac OS

12
00:00:50.100 --> 00:00:51.200
so let's quickly begin.

13
00:00:52.200 --> 00:00:55.400
Now for that, what we are going to do is we are

14
00:00:55.400 --> 00:00:59.000
 going to set up the Samba server in two phases.

15
00:00:58.500 --> 00:01:01.200
 The first part is going to be

16
00:01:01.200 --> 00:01:04.400
 a guest Samba server in which anyone can

17
00:01:04.400 --> 00:01:07.200
 connect to your Samba server and fetch your

18
00:01:07.200 --> 00:01:10.400
 files or also if you give right permissions, they can

19
00:01:10.400 --> 00:01:13.100
 modify the files as well. The second

20
00:01:13.100 --> 00:01:16.600
 that we are going to see is specific to a user.

21
00:01:17.500 --> 00:01:20.400
So that will be a excess control which means

22
00:01:20.400 --> 00:01:23.300
 only a user X or a

23
00:01:23.300 --> 00:01:26.700
 user Rohit can only access your Samba

24
00:01:26.700 --> 00:01:29.400
 server see the file download the file

25
00:01:29.400 --> 00:01:32.400
 or modify the file. Alright, so let's

26
00:01:32.400 --> 00:01:35.600
 see the first one which is creating a guest

27
00:01:35.600 --> 00:01:36.600
 Samba server.

28
00:01:37.400 --> 00:01:41.000
Perfect. So for this I'm going to start my parrot

29
00:01:40.400 --> 00:01:43.500
 operating system as you can see I have already

30
00:01:43.500 --> 00:01:46.500
 done the SSH into my parrot

31
00:01:46.500 --> 00:01:49.600
 operating system over here and I'm currently logged in

32
00:01:49.600 --> 00:01:52.400
 using root. This is my virtual machine which

33
00:01:52.400 --> 00:01:55.500
 is running and you can see this is the parrot OS that

34
00:01:55.500 --> 00:01:59.100
 I have done SSH into perfect. So

35
00:01:58.100 --> 00:02:01.400
 the first thing that we are going to do is see

36
00:02:01.400 --> 00:02:04.400
 the IP address and you can see the IP address of

37
00:02:04.400 --> 00:02:08.500
 my Linux operating system is 192 168

38
00:02:07.500 --> 00:02:10.400
 dot 0.69, which

39
00:02:10.400 --> 00:02:13.200
 I have seen using the command if config.

40
00:02:13.900 --> 00:02:16.100
Perfect now once I know

41
00:02:16.100 --> 00:02:19.800
 the IP address of my Linux machine, I will clear my terminal.

42
00:02:20.400 --> 00:02:23.200
Perfect now for creating a

43
00:02:23.200 --> 00:02:27.400
 Samba server into your computer, you should have the samba

44
00:02:26.400 --> 00:02:29.500
 service running or the

45
00:02:29.500 --> 00:02:31.800
 samba program installed into your computer.

46
00:02:32.900 --> 00:02:35.400
In case you do not know if you have installed this

47
00:02:35.400 --> 00:02:38.700
 program or this service you can simply type this

48
00:02:38.700 --> 00:02:42.900
 command to check which is service smbd status,

49
00:02:41.900 --> 00:02:44.200
 as you can see it is

50
00:02:44.200 --> 00:02:47.800
 active and running into my computer perfect. In

51
00:02:47.800 --> 00:02:50.300
 case it is not installed into your computer

52
00:02:50.300 --> 00:02:53.300
 and you see a error you can simply install it

53
00:02:53.300 --> 00:02:57.600
 using the command apt-get install Samba

54
00:02:56.600 --> 00:02:59.700
 space - y now it

55
00:02:59.700 --> 00:03:02.600
 will automatically install all the required

56
00:03:02.600 --> 00:03:04.200
 packages into your computer.

57
00:03:05.200 --> 00:03:08.400
In my computer, it is already installed. So I'm not

58
00:03:08.400 --> 00:03:11.400
 going to install it again. Perfect. So the

59
00:03:11.400 --> 00:03:14.400
 first requirement is successfully fulfilled that

60
00:03:14.400 --> 00:03:17.500
 we have Samba installed into our computers.

61
00:03:18.900 --> 00:03:21.200
The next step is modifying the

62
00:03:21.200 --> 00:03:25.000
 SMB configuration file, which is the samba configuration

63
00:03:24.300 --> 00:03:27.200
 file. So for that you need to go to

64
00:03:27.200 --> 00:03:31.400
 this path, which is ETC Samba smb.com. And

65
00:03:30.400 --> 00:03:33.500
 this is the configuration file which

66
00:03:33.500 --> 00:03:36.800
 is responsible for running settings into

67
00:03:36.800 --> 00:03:39.500
 the Samba server just scroll down

68
00:03:39.500 --> 00:03:42.600
 at the bottom of this configuration file

69
00:03:42.600 --> 00:03:45.500
 and you have to write some of the lines as

70
00:03:45.500 --> 00:03:46.400
 you can see over here.

71
00:03:47.700 --> 00:03:50.200
Now as you can see onto the left side of the

72
00:03:50.200 --> 00:03:53.600
 screen, this is what you have to write to make a guest

73
00:03:53.600 --> 00:03:56.500
 Samba server. So basically a comment

74
00:03:56.500 --> 00:03:59.200
 saying rohit's share and the

75
00:03:59.200 --> 00:04:02.400
 share name. So this is my share you can give any

76
00:04:02.400 --> 00:04:05.500
 name that you want. So as you can see I have given my share

77
00:04:05.500 --> 00:04:08.400
 so this name will be shared with the device and

78
00:04:08.400 --> 00:04:11.600
 they will be able to see something into that Network that

79
00:04:11.600 --> 00:04:13.400
 has been shared which is my share.

80
00:04:14.300 --> 00:04:17.300
You can give any name you want you're free to give that the next

81
00:04:17.300 --> 00:04:18.200
 thing is the comment.

82
00:04:18.900 --> 00:04:21.100
Which is Samba Works, which will be

83
00:04:21.100 --> 00:04:24.900
 seen that whenever anyone gets connected the path.

84
00:04:24.900 --> 00:04:27.700
 The path is basically the directory that

85
00:04:27.700 --> 00:04:31.100
 you want to share from your computer read only

86
00:04:30.100 --> 00:04:33.600
 no, so we do not want them

87
00:04:33.600 --> 00:04:36.700
 to only read they can write also they

88
00:04:36.700 --> 00:04:39.600
 can also modify and guest. Okay, is

89
00:04:39.600 --> 00:04:42.400
 any guest can connect to this

90
00:04:42.400 --> 00:04:45.200
 Samba server? Perfect. So you need to

91
00:04:45.200 --> 00:04:46.400
 add these lines over here.

92
00:04:47.300 --> 00:04:50.700
Now the path over here that I have given is slash

93
00:04:50.700 --> 00:04:53.300
 root slash UFO net because I want

94
00:04:53.300 --> 00:04:56.500
 to give the excess of UFO net folder

95
00:04:56.500 --> 00:04:59.000
 or directory from my Samba server.

96
00:04:59.500 --> 00:05:02.100
Perfect. You can see over here that I have

97
00:05:02.100 --> 00:05:05.700
 written exactly the same thing and I have saved it and I

98
00:05:05.700 --> 00:05:08.400
 will come out of this and after you make any

99
00:05:08.400 --> 00:05:11.700
 changes into the samba configuration file, you

100
00:05:11.700 --> 00:05:14.000
 need to restart the Samba server.

101
00:05:14.600 --> 00:05:17.300
As you can see I have successfully restarted it and

102
00:05:17.300 --> 00:05:20.400
 I'm checking if everything is working fine and you

103
00:05:20.400 --> 00:05:23.200
 can see it is active and running and there is

104
00:05:23.200 --> 00:05:26.700
 no issues. Currently, that means we are absolutely perfect.

105
00:05:28.200 --> 00:05:31.200
Now I'm showing this into Mac OS you

106
00:05:31.200 --> 00:05:34.200
 can also do this into Windows operating system as well

107
00:05:34.200 --> 00:05:37.300
 for running this or connecting from a Windows

108
00:05:37.300 --> 00:05:40.300
 OS to our Linux operating system, which is

109
00:05:40.300 --> 00:05:43.800
 parrot. You need to open the Run prompt from

110
00:05:43.800 --> 00:05:46.300
 your computer start menu, or you

111
00:05:46.300 --> 00:05:49.200
 can simply press the windows R command. You can

112
00:05:49.200 --> 00:05:52.100
 type double slash the IP address where you

113
00:05:52.100 --> 00:05:55.200
 want to connect in Mac OS you can see you can

114
00:05:55.200 --> 00:05:58.300
 open any finder and press the shortcut which

115
00:05:58.300 --> 00:05:59.100
 is command k

116
00:05:59.900 --> 00:06:02.500
Once you press the command key shortcut, as

117
00:06:02.500 --> 00:06:05.200
 you can see over here, which says connect to

118
00:06:05.200 --> 00:06:09.300
 server command K. This prompt will open now here

119
00:06:08.300 --> 00:06:11.300
 you need to type SMB colon double

120
00:06:11.300 --> 00:06:14.300
 slash the IP address of the server to which you

121
00:06:14.300 --> 00:06:16.400
 want to connect and simply hit connect.

122
00:06:17.700 --> 00:06:20.500
And you can see it shows my share. This

123
00:06:20.500 --> 00:06:23.400
 is the name that we have given perfect. Let's hit OK

124
00:06:23.400 --> 00:06:26.300
 and here you can see this is the

125
00:06:26.300 --> 00:06:29.700
 folder UFO net which has been shared

126
00:06:29.700 --> 00:06:32.700
 from the Samba server. Let's go into the Rohit

127
00:06:32.700 --> 00:06:35.200
 folder and let's see what is inside and you

128
00:06:35.200 --> 00:06:38.300
 can see there is a file called as hack Dot txt.

129
00:06:38.300 --> 00:06:41.700
 And we are able to see this. Let's confirm from our Linux

130
00:06:41.700 --> 00:06:44.500
 system as well. Let's go in Rohit. Let's

131
00:06:44.500 --> 00:06:47.600
 open a file which is hack Dot txt. And let's verify

132
00:06:47.600 --> 00:06:50.800
 is there the same content and perfect here

133
00:06:50.800 --> 00:06:53.700
 we can see it is exactly the same content over

134
00:06:53.700 --> 00:06:53.800
 here.

135
00:06:55.400 --> 00:06:58.500
Perfect. So we are able to successfully access the

136
00:06:58.500 --> 00:07:01.100
 Samba server from our Mac OS.

137
00:07:01.500 --> 00:07:04.300
Now, let's try one more thing as we have given

138
00:07:04.300 --> 00:07:07.800
 the read only no which means the user

139
00:07:07.800 --> 00:07:10.400
 can also write. So let's try to create a

140
00:07:10.400 --> 00:07:13.900
 new folder and let's give a name to this folder. So

141
00:07:13.900 --> 00:07:17.200
 a randomly let's say xss by Rohit

142
00:07:16.200 --> 00:07:18.500
 and let's say Samba.

143
00:07:19.200 --> 00:07:22.600
And let's see if this folder has been successfully created

144
00:07:22.600 --> 00:07:23.600
 here or no.

145
00:07:24.600 --> 00:07:27.100
Let's go one step back and do LS and you

146
00:07:27.100 --> 00:07:30.500
 can see the folder has been successfully created. So let's

147
00:07:30.500 --> 00:07:33.700
 go inside this folder and let's create a file and

148
00:07:33.700 --> 00:07:36.200
 let's see after we create a file

149
00:07:36.200 --> 00:07:39.200
 from the Linux system. We are able to see it in real time

150
00:07:39.200 --> 00:07:42.600
 over here or no. So let's create a file using Nano

151
00:07:42.600 --> 00:07:46.000
 and let's say the file name is done. And

152
00:07:45.800 --> 00:07:48.900
 let's say we write this works inside

153
00:07:48.900 --> 00:07:49.800
 it save it.

154
00:07:50.600 --> 00:07:53.400
And you can see the file has been successfully created

155
00:07:53.400 --> 00:07:53.800
 over here.

156
00:07:55.200 --> 00:07:58.300
Let's give extension to this file as well as we need to open it into

157
00:07:58.300 --> 00:08:01.400
 the Mac OS to verify. So let's say we move

158
00:08:01.400 --> 00:08:03.900
 this file to done Dot txt. And

159
00:08:05.400 --> 00:08:08.200
the extension has been successfully changed and you can see it works

160
00:08:08.200 --> 00:08:11.500
 when I open this file. I am able to see the content

161
00:08:11.500 --> 00:08:12.300
 inside it.

162
00:08:12.900 --> 00:08:15.200
So this is it for this video? I hope you guys

163
00:08:15.200 --> 00:08:18.500
 understood how we can configure Samba server and how

164
00:08:18.500 --> 00:08:21.600
 we can access it in case you have any issues or

165
00:08:21.600 --> 00:08:24.400
 doubt. You can always post it into the Q&A section.

166
00:08:24.400 --> 00:08:27.500
 I will always help you in case you get

167
00:08:27.500 --> 00:08:29.500
 stuck on any point. Thank you.
