1
00:00:00,000 --> 00:00:17,039
Hey guys and welcome back. In the previous nugget we had talked about some of the configuration

2
00:00:17,039 --> 00:00:22,240
files that we could use to ultimately display user notifications. What we're now going to

3
00:00:22,240 --> 00:00:26,600
do is to see what those files actually look like. So what I'm going to do here is I'm

4
00:00:26,600 --> 00:00:32,359
going to go to my terminal and I will open up the first file which would be the Etsy

5
00:00:32,359 --> 00:00:39,039
issue file. In fact I'll do this with super user privileges and I'll type in my password.

6
00:00:39,039 --> 00:00:47,240
So now we see this configuration file we actually see Ubuntu, we see the version long term supports

7
00:00:47,240 --> 00:00:52,920
and we see these special characters backslash n backslash l. Now we talked about these special

8
00:00:52,920 --> 00:00:58,480
characters and these are ultimately going to represent different values. Now what I can

9
00:00:58,480 --> 00:01:03,120
do here is I can actually modify this particular file. So what I'll do is I'll just say hello

10
00:01:03,120 --> 00:01:09,920
there please login and again let's maybe change this value from backslash n maybe we'll say

11
00:01:09,920 --> 00:01:17,159
backslash r and we'll also do backslash t for the time. Okay so if I just write this out

12
00:01:17,159 --> 00:01:23,679
and I escape what I want to do is I want to get my login screen. Now remember this is

13
00:01:23,679 --> 00:01:28,599
going to be a pre login we're not going to see after login and crucially this is not

14
00:01:28,599 --> 00:01:33,879
going to be seen over the network. So I open up my putty session let's open this up notice

15
00:01:33,879 --> 00:01:39,879
that we don't actually see this pre login message here we just have our login prompts

16
00:01:39,879 --> 00:01:44,759
let me close this down. What I will do here is I will actually change the run level to

17
00:01:44,760 --> 00:01:50,120
run level 3 which will just be a command line interface this will now restart the system

18
00:01:50,120 --> 00:01:55,800
and look at this we actually see the exact message that we changed within that configuration

19
00:01:55,800 --> 00:02:00,680
file we see that hello there we also see the time so on so forth now we can login so I'll

20
00:02:00,680 --> 00:02:07,560
say ipv0 type in my password hit enter and now that I've logged in we see the post login

21
00:02:07,560 --> 00:02:13,120
message so what I will do is I'll just change the run level back to run level 5 so hit enter

22
00:02:13,120 --> 00:02:18,080
type in my password and we'll get our graphical user interface back there we go let's just

23
00:02:18,080 --> 00:02:24,879
log back in but like I say we didn't actually see this pre login banner over ssh so what

24
00:02:24,879 --> 00:02:29,480
we're going to do is we're going to make a modification to that ssh configuration file

25
00:02:29,480 --> 00:02:37,480
remember we talked about that so I'll say sudo nano ssh ssh d underscore config and hit

26
00:02:37,480 --> 00:02:42,560
enter type in the password now what I'm going to do is I'm going to scroll all the way down

27
00:02:42,560 --> 00:02:47,120
till I see my banner right here I'm going to uncomment this and I'm going to change

28
00:02:47,120 --> 00:02:55,599
the value none and I'm going to now specify that the banner should look in sssh.net so

29
00:02:55,599 --> 00:03:00,360
now my ssh configuration is now pointing to this particular file what I'm now going to

30
00:03:00,360 --> 00:03:06,000
do is I'm going to modify this file so I'll say issue.net and what I will do I'll just

31
00:03:06,000 --> 00:03:14,520
delete this and say welcome to CBT Nuggets system please login okay so let's just save

32
00:03:14,520 --> 00:03:20,360
you and I'll escape and now what I'm going to have to do to make this actually operational

33
00:03:20,360 --> 00:03:28,840
is I'm going to have to restart my ssh config so what we'll say is sudo system CTL restart

34
00:03:28,840 --> 00:03:34,360
ssh d this will reload that configuration file so now what I'll do is I'll go to login

35
00:03:34,360 --> 00:03:41,320
via ssh I'll get my putty session let's open this up now when I type in my login username

36
00:03:41,320 --> 00:03:47,160
as ipv0 we actually see this pre authentication banner you see that right here even though

37
00:03:47,160 --> 00:03:52,200
I've not actually logged in so what I will do is I'll type in my password right now and

38
00:03:52,200 --> 00:03:58,480
if I hit enter now we actually log into the system so before we logged in we get this

39
00:03:58,480 --> 00:04:03,880
message right here and after we authenticate we get the post message so if we want to modify

40
00:04:03,879 --> 00:04:11,879
what we see after the login like I say we can modify the etsemotd banner or the etsemotd

41
00:04:11,879 --> 00:04:17,839
configuration file so what I'll do is I'll say sudo nano etsemotd and I'll just say congrats

42
00:04:17,839 --> 00:04:25,680
on logging in have a great day at work there we go so let's save this and what I will do

43
00:04:25,680 --> 00:04:32,600
put up putty okay let's login with my password hit enter notice now what we actually see here

44
00:04:32,600 --> 00:04:37,680
we can see indeed we have our message of the day congrats on logging in have a great day

45
00:04:37,680 --> 00:04:42,820
at work now these are ultimately automated messages they are generated when someone logs

46
00:04:42,820 --> 00:04:48,480
in automatically from these configuration files however if we just want to send a message

47
00:04:48,480 --> 00:04:53,800
to everyone on the system what we can do is use the wall command so what I could see here

48
00:04:53,800 --> 00:05:02,080
is a wall and then I could broadcast backing up the system tomorrow please do local backups

49
00:05:02,279 --> 00:05:09,039
now if I hit enter this is just going to display this message right here but the key thing to note

50
00:05:09,039 --> 00:05:15,000
here is this is actually a broadcast message now as it transpires I only have the user ipv0 on the

51
00:05:15,000 --> 00:05:21,120
system but if you imagine there were 10 different users all logged on to the system this message

52
00:05:21,120 --> 00:05:27,479
here using the wall command is going to be broadcast to absolutely everyone so this is a good way to

53
00:05:27,480 --> 00:05:34,280
send messages to the entire user base when you have to communicate something on the fly and like

54
00:05:34,280 --> 00:05:39,480
I say it tells you who the message came from and it will be displayed to all different users so as

55
00:05:39,480 --> 00:05:44,000
we can see here we have these different configuration files that we can use to ultimately send

56
00:05:44,000 --> 00:05:52,160
particular messages either pre-login or post-login as well as messages for local logins as well as

57
00:05:52,360 --> 00:05:59,600
messages for remote logins such as over SSH and we also have the wall command to allow us to send

58
00:05:59,600 --> 00:06:06,200
messages to all users on the system on the fly as we see fit okay doc so that is us for understanding

59
00:06:06,200 --> 00:06:10,440
user notifications I hope this has been informative for you and I'd like to thank you for viewing

