WEBVTT - This file was automatically generated by VIMEO

0
00:00:04.500 --> 00:00:07.300
Hey, welcome back to this video.

1
00:00:07.300 --> 00:00:10.600
 So in this lesson, we are going to learn how

2
00:00:10.600 --> 00:00:13.400
 you can configure Samba with a specific

3
00:00:13.400 --> 00:00:16.100
 user in the previous lesson. We have

4
00:00:16.100 --> 00:00:20.000
 learned how you can configure Samba for guest user

5
00:00:19.500 --> 00:00:22.700
 which basically means anyone into

6
00:00:22.700 --> 00:00:25.500
 that Network can access your sambar share

7
00:00:25.500 --> 00:00:28.300
 and all your private files. But now

8
00:00:28.300 --> 00:00:31.400
 we want to keep excess control and we

9
00:00:31.400 --> 00:00:35.500
 only want to provide access to those users

10
00:00:34.500 --> 00:00:37.400
 which have the username and

11
00:00:37.400 --> 00:00:40.400
 password for our Samba server. So

12
00:00:40.400 --> 00:00:44.500
 this basically means we are providing authentication and

13
00:00:43.500 --> 00:00:46.400
 there will be a username and password

14
00:00:46.400 --> 00:00:47.900
 which we are going to send.

15
00:00:49.700 --> 00:00:52.600
Which we are going to set for accessing our

16
00:00:52.600 --> 00:00:55.300
 Samba share. Alright, so for

17
00:00:55.300 --> 00:00:58.300
 this we are going to add a username and

18
00:00:58.300 --> 00:01:01.100
 a password. So let's quickly see that so I have

19
00:01:01.100 --> 00:01:04.100
 already logged in into my parrot OS on which

20
00:01:04.100 --> 00:01:06.200
 I'm going to configure the Samba server.

21
00:01:06.800 --> 00:01:09.300
So first thing first, we are going to add a user which

22
00:01:09.300 --> 00:01:12.400
 is shifa. I have already added a user in

23
00:01:12.400 --> 00:01:15.700
 my computer. That is the reason it is saying that user

24
00:01:15.700 --> 00:01:18.200
 already exists in your computer.

25
00:01:18.200 --> 00:01:21.400
 You may not see the error because you do not have this user

26
00:01:21.400 --> 00:01:24.700
 or in case you have the user and you

27
00:01:24.700 --> 00:01:27.000
 see this error. No problem. You can move further.

28
00:01:27.800 --> 00:01:30.100
You can simply set a password for that

29
00:01:30.100 --> 00:01:33.500
 user as well. So for Simplicity, I'm going to set the password

30
00:01:33.500 --> 00:01:36.300
 as root for now. Now I

31
00:01:36.300 --> 00:01:39.200
 have created a user and I also set a password for

32
00:01:39.200 --> 00:01:42.800
 that user. Now. I need to add this user

33
00:01:42.800 --> 00:01:45.300
 to the SMB login list or

34
00:01:45.300 --> 00:01:48.600
 the SMB user list for that. I'm going to use the command

35
00:01:48.600 --> 00:01:51.800
 which is SMB past WD - A that

36
00:01:51.800 --> 00:01:54.900
 means I want to add a user which is shifa

37
00:01:54.900 --> 00:01:57.500
 and hit enter and it is going to ask you

38
00:01:57.500 --> 00:02:00.500
 to create a password. So let me again keep this

39
00:02:00.500 --> 00:02:02.000
 same password as root.

40
00:02:02.900 --> 00:02:05.200
Now I have successfully create.

41
00:02:06.200 --> 00:02:09.600
Now I have successfully created a SMB user

42
00:02:09.600 --> 00:02:12.400
 as well. Perfect. Remember in case

43
00:02:12.400 --> 00:02:15.700
 you want to remove a user you can use hyphen X

44
00:02:15.700 --> 00:02:18.500
 to remove in case you want to add a user

45
00:02:18.500 --> 00:02:21.200
 you can use hyphen a perfect. Let's move

46
00:02:21.200 --> 00:02:21.500
 again.

47
00:02:22.800 --> 00:02:26.100
Let us modify the configuration file

48
00:02:25.100 --> 00:02:28.900
 for Samba and here

49
00:02:28.900 --> 00:02:31.400
 once we log in you can see here. I have

50
00:02:31.400 --> 00:02:35.100
 already written something. So this is she fast

51
00:02:34.100 --> 00:02:37.800
 share that I have given the name comment is

52
00:02:37.800 --> 00:02:41.300
 Samba works. I have created a directory valid

53
00:02:40.300 --> 00:02:43.300
 uses shifa and read only

54
00:02:43.300 --> 00:02:46.400
 no perfect. So I have specified a user

55
00:02:46.400 --> 00:02:49.600
 over here, which is shifa. You can specify more users

56
00:02:49.600 --> 00:02:52.200
 if you want by giving just a space over here.

57
00:02:52.200 --> 00:02:55.600
 So let's say she far Rohit or x y

58
00:02:55.600 --> 00:02:58.300
 z any user now, I'm going to save this

59
00:02:58.300 --> 00:03:01.800
 configuration file and you need to restart the

60
00:03:01.800 --> 00:03:04.100
 smbd service in case you

61
00:03:04.100 --> 00:03:07.800
 make any changes now, I have successfully restarted it

62
00:03:07.800 --> 00:03:10.700
 and let me just verify if everything is working

63
00:03:10.700 --> 00:03:11.100
 fine.

64
00:03:12.900 --> 00:03:15.600
And you can see over here it is active and

65
00:03:15.600 --> 00:03:18.600
 running which means it is working perfectly fine.

66
00:03:18.600 --> 00:03:21.400
 So it's time to login and check if the

67
00:03:21.400 --> 00:03:24.600
 user that we have created is working fine or

68
00:03:24.600 --> 00:03:27.500
 no. So, let me open a finder and let me

69
00:03:27.500 --> 00:03:30.400
 open up this connect to server dialog box

70
00:03:30.400 --> 00:03:32.700
 using the shortcut which is command k

71
00:03:34.200 --> 00:03:37.400
Let me connect to the IP address and hit on connect

72
00:03:37.400 --> 00:03:40.300
 and let's wait for this. It should ask us

73
00:03:40.300 --> 00:03:43.200
 for a prompt and it is asking us for a

74
00:03:43.200 --> 00:03:46.700
 prompt. So the name of the user which is the registered

75
00:03:46.700 --> 00:03:49.500
 user. This time is shifa and the password is

76
00:03:49.500 --> 00:03:51.500
 root and let's hit on connect.

77
00:03:52.800 --> 00:03:55.700
Let's wait for this to verify and

78
00:03:55.700 --> 00:03:58.200
 you can see shifas share. Let me

79
00:03:58.200 --> 00:04:01.400
 just hit enter and perfect. You can see there is

80
00:04:01.400 --> 00:04:04.300
 a file called as secret. Let me open it and you

81
00:04:04.300 --> 00:04:08.100
 can see this is a secret file perfect. Now,

82
00:04:07.100 --> 00:04:10.500
 let's verify this the same file. Let's

83
00:04:10.500 --> 00:04:12.400
 go to the folder, which is shifa.

84
00:04:13.600 --> 00:04:16.700
And you can see there is a file called as secret Dot

85
00:04:16.700 --> 00:04:16.900
 txt.

86
00:04:17.600 --> 00:04:20.600
Perfect. Now we are able to complete this practical in

87
00:04:20.600 --> 00:04:23.100
 which we saw in case there are

88
00:04:23.100 --> 00:04:26.500
 some confidential or private files in this

89
00:04:26.500 --> 00:04:29.700
 computer, and we want to share those file on

90
00:04:29.700 --> 00:04:32.700
 our Samba. So for that we can also

91
00:04:32.700 --> 00:04:35.700
 authenticate the user by making

92
00:04:35.700 --> 00:04:38.500
 a Samba user. So in this case we created

93
00:04:38.500 --> 00:04:42.300
 a user that was shifa, and yes, no

94
00:04:41.300 --> 00:04:45.000
 guest user can connect to this registered

95
00:04:44.400 --> 00:04:47.700
 user and cannot access your sensitive

96
00:04:47.700 --> 00:04:50.600
 files. So this way you can protect your sensitive content

97
00:04:50.600 --> 00:04:53.600
 by creating a user and you can configure a

98
00:04:53.600 --> 00:04:56.800
 password for that as well. So I hope you guys understood. Thank

99
00:04:56.800 --> 00:04:57.000
 you.
