Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed configuration scheme of linux samba server client

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the "linux samba server client detailed configuration scheme" knowledge, in the actual case of the operation process, many people will encounter such a dilemma, then let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Configure server-side printers and their sharing: 1. Setting up the printer is of course using cups system, if you use the distribution is Ubuntu and other stupid Linux, then cups should be installed and started by default, all you need to do is configure it, then please skip to the second step. I will only mention the distributions I have used: gentoo and archLinux. I won't discuss the pros and cons of these two distributions here. I can only say that they are excellent distributions. For gentoo users, installing and starting cups is simple: #emerge -av cups#rc-update -a cupsd default If using archLinux: #pacman -S cups#vim (or other editor)/etc/rc.conf Add cups to the DAEMONS line and it will work 2. Now we can configure and test our printer, I use a USB interface printer HP LaserJet 1200, for the current newer kernel (using udev system), the printer can be plugged in immediately recognized, unless your kernel does not support usb!, If you want to see if you really recognize it, you can use the following command: #lsusb(pci-utils package needs to be installed) or check dmesg: #dmesg| Grep usb if it is just plugged into the computer, you can also do this: #dmesg| If your printer uses other interfaces that are not supported by the kernel, get kernel support first (load the relevant modules or compile them directly into the kernel), and you may need additional help. Now it's time to configure cups, which provides a web-based configuration interface that's all too convenient for desktop users. If you can't install the desktop system, sorry, no help is available here. Make sure the cups server process is up and running. Type localhost:631 in your browser (whatever you like, I use firefox) and the cups configuration interface will start! For those of you who are not familiar with English, I regret that this interface has not been sinicized. Click "add printer" to add a printer. After entering the next page, you are required to enter "name","location" and "description". In fact, you can write them casually. Of course, name is the name of the printer. Just choose a professional and easy to remember name. Location describes where the printer is (hanging on yourself, I will write localhost). Discussion is the printer description, which can be blank. Click continue to go to the next page. This step selects the printing device, the most critical step, if you have found your printer according to the previous instructions, it is very easy to find it here, click the drop-down menu, there must be one of your printers, select it, and then continue. This step is to select the driver, generally speaking, the system has already come with your printer driver and recommended several to you, according to the recommended choice of a most like (no go back is changed), if you do not provide your printer driver, you need to go here to see, search for your printer driver and download the corresponding ppd file, save it, and then click browse... Manually add drives. After adding the driver, the next step is "add printer". Enter the root username and password. After typing enter, congratulations, the printer has been added successfully! All you have to do is print out a test page and see if the printer works. 3. Once cups is configured, you need to start the linux samba service to share the printer. First of all, of course, install samba and start samba services, which is exactly the same as installing cups. Before starting the linux samba service share, configure/etc/samba/smb.conf. Samba provides a default configuration file in/etc/samba /smb.conf.default (or maybe somewhere else, but there's always one), which you can copy as a template for your configuration file with minor modifications. Configuration methods are available online, but in order to make printer sharing less fancy, you only need to set the following lines: [global]workgroup=yourgroupnameserver string=abcsecurity=shareload printers = yes[printers]comment = All Printerspath = /var/spool/sambabrowseable = noguest ok = nowritable = noprintable = yes After configuration is complete, start linux samba service sharing. The manual method is as follows: # /etc/init.d/samba restart If arch, the service startup script is placed under/etc/rc.d/. *** The server-side configuration is complete by adding samba to the startup process. How to configure the client: 1. Windows client configuration is very simple, directly in the start menu of "printers and fax" inside, click "add printer", select "network printer... "Then browse the printer, find a computer that is the same as the server string previously set up on the server side, click below, the shared printer will drop down, select it, install, then the system will prompt to install the print driver, select the printer manufacturer in the pop-up list window, then the printer model on the side, and then install, OK after a while! A newly installed printer may display something like access denied, unable to connect, etc. Ignore it because samba has set up a non-browsable reason that does not affect printing. Next, the test, congratulations if ok. 2. Linux client configuration is slightly more cumbersome, that is, the same need for cups and samba (samba may not need, not tested), when adding printers to cups, select "Windows printer via samba" when selecting print devices, and then the next interface requires you to enter the location in the network, because we are shared through linux samba service, of course, smb://begins, but how to write later has been difficult for me for a long time, now I know a trick: Using smbclient: $ smbclient -L (server string)server string is the samba server name previously set. This will list all resources shared on the server side. Find the printer and write down its name, e.g. mine is HPLaserJ, so that my location would be smb://(server string)/HPLaserJ. User authentication may be required under Linux (if there is no guest user), in this case *** add a user account for Linux users on the server side, and add this account to samba users: #smbpasswd -a username"Linux samba server client detailed configuration scheme" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report