Both Mac and Linux systems know how to use Windows naming functions. The trick is to understand how they do it and to configure them to work with an existing Windows network.
- You got to hand it to Microsoft. If there's one thing they've done right, is they have developed the concept of Active Directory in such a way that everybody likes to use it. Not only Active Directory for logons and such, but even on top of that, the ability to use folder and printer sharing in the classic Microsoft way is so dominant that even all the other primary operating systems follow along with this. So basically that means if you're going to be running a Linux system or if you're going to be running a Mac system and you want to share folders and files, you'll probably be doing it the Microsoft way, which is actually kind of interesting. Now Microsoft has had their own methodology for sharing that goes back to the 1980s. And it started with something called LAN manager, and this has evolved a lot over the years, and we now call it server message blocks, or SMB. Built into Linux and built into Macs is a Windows folder and printer-sharing emulation tool called Samba. Now, what's interesting is that it really depends on your Linux distribution whether you have Samba or not. Sometimes you might have to install it, sometimes it's built in automatically. So I've got a copy of Ubuntu desktop right here, and it has Samba built in, literally when you install it, it's already there. Over here I've got a nice new Mac system. And on the Mac system, it has Samba also built in and can handle all of this pretty much automatically. So what I want to do in this episode is talk about how we share folders and files using SMB on both a Linux and a Mac. So, let's start this process over here on my Linux system. So it all starts right here when I opened up Settings. There is an option in here called Sharing, you see it right there? So I'm going to go ahead and turn Sharing on for starters, and you'll notice that I have to give it a computer name. Remember, if you're going to be using server message blocks, you've got to give each of your clients a name that Windows systems can understand. Now there used to be a lot of limitations to the names, but today you can put spaces in, all kinds of stuff and it works just fine. However, I always like to keep tight little 15-character maximum names. There's a few older versions of Windows that might have trouble with anything bigger than that, but that's me. I'm an old guy and I'm paranoid. So if we're going to be using Samba, we have got to establish a computer name. Now luckily for us, when we install Ubuntu, it asks for the name of a computer at the beginning. That's used for a lot of different things, but in this case, it's going to be used as the name of the computer on the network itself. So I'm going to go ahead and select MikeUbuntu, that's fine, and I've got it turned on. So once that's up and running, let me just go ahead and close that. All I need to do is I'll come over to my Files tool, which is often called Nautilus, look at me double-clicking like a Windows guy. Okay, so what I can do at this point is I can first of all access other shares. So once I can actually see all of these computers, I can just click on one. Now here's the tricky part. You have to have a username and a password. By default, it thinks it's on WORKGROUP, and if that particular computer is on a workgroup called WORKGROUP, well I can get to it that way. But normally what we'll end up doing is stuff like, I could actually type in the name of my domain. And a password. And let's see if it connects, fantastic. So now we can actually see the individual shares. I think it's pretty amazing that you have so many versions of Linux now that come with Samba built in. I'm going to tell you right now, if you have Linux systems that need to live in a Windows world, I'm a big believer in using these that have the pre-installed Samba. The reason it's nice is because to install Samba from scratch is in my opinion a little bit of a challenge. In particular, you're going to be dealing with this one particular file called SMB or Samba.conf. And it's this text file and you have to edit it and say, this is the domain I want to be in, or this is a workgroup, and here's my computer name and all that. All these built-in tools are absolutely fantastic, because not only is Samba up and running, but we have graphical tools like this Nautilus, which knows how to deal with Samba. So I can click on stuff and open things up, type in passwords, and I can get in to Windows systems. Now if you think that's nice, where you really want to see beauty, you have to go over to the macOS. So I've got a nice Mac system right here, and what I want to do is configure this guy so that we can actually get into our Windows network. Now it is Samba, but they don't really call it Samba, they just call it Windows file sharing. It's okay, it works out, pretty much what we just saw over here, but a little bit prettier. So let's try it. So the big place where everything starts is right here under System Preferences. One of the first things I'm going to do is I'm going to create users that match my domain. So for example this account right here, I've got this guy set up so that it looks just like the accounts that I have on my domain itself. And I can make any changes here I might want to do. To actually go through the sharing process, we go to Sharing. Now what I can do here is first of all, there's a computer name. My buddy Bryan, yeah I'm borrowing an iMac from my buddy. And you'll see he's got apostrophes and spaces 'cause he's younger and cooler than me. Let's go ahead and click on File Sharing. And I've got File Sharing turned on. Here's where I can actually create shared folders. So if I want to share something, I could just come in here, make new shares. And you'll notice right here it says Share Files And Folders Using SMB. Because there's actually a Apple Filing Protocol, AFP, which is deprecated now, but if I wanted to use this, I could also run this at the same time and create shares there. So that's it. If you want to share folders and files, you're probably going to be using SMB. So obviously Windows all have it built in, but now many, many distributions of Linux have it built in and every copy of macOS has Samba ready to rock and roll. Just remember, you're going to have to give it a name, you're going to have to turn on this ability, and once that's done, you can go ahead and start sharing folders and files and accessing other people's folders and files just like a regular Windows system. (casual offbeat music)
This Total Seminars course covers the exam certification topics. For information on additional study resources—including practice tests, lab simulations, books, and discounted exam vouchers—visit totalsem.com/linkedin. LinkedIn Learning members receive special pricing.
This course was created by Total Seminars. We are pleased to offer this training in our library.