您好,登錄后才能下訂單哦!
本篇文章給大家分享的是有關(guān)centos7中如何安裝samba,小編覺得挺實用的,因此分享給大家學(xué)習(xí),希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。
[root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.1234
[root@localhost ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. # SELINUX=enforcing SELINUX=disabled # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted1234567891011121314
[root@localhost ]# yum install samba #查看 [root@localhost ]# rpm -qa | grep samba samba-common-libs-4.8.3-4.el7.x86_64 samba-libs-4.8.3-4.el7.x86_64 samba-common-tools-4.8.3-4.el7.x86_64 samba-common-4.8.3-4.el7.noarch samba-client-libs-4.8.3-4.el7.x86_64 samba-4.8.3-4.el7.x86_64 samba-client-4.8.3-4.el7.x86_6412345678910111213
samba-common-3.5.10-125.el6.x86_64 //主要提供samba服務(wù)器的設(shè)置文件與設(shè)置文件語法檢驗程序testparm samba-client-3.5.10-125.el6.x86_64 //客戶端軟件,主要提供linux主機作為客戶端時,所需要的工具指令集 samba-swat-3.5.10-125.el6.x86_64 //基于https協(xié)議的samba服務(wù)器web配置界面 samba-3.5.10-125.el6.x86_64 //服務(wù)器端軟件,主要提供samba服務(wù)器的守護程序,共享文檔,日志的輪替,開機默認選項1234
安裝后會生成/etc/samba目錄,
#======================= Global Settings ===================================== [global] # ----------------------- Network Related Options ------------------------- # # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH # # server string is the equivalent of the NT Description field # # netbios name can be used to specify a server name not tied to the hostname workgroup = WORKGROUP server string = Liuyunsheng Samba Server Version %v netbios name = Liuyunsheng-Samba # --------------------------- Logging Options ----------------------------- # # Log File let you specify where to put logs and how to split them up. log file = /var/log/samba/log.%m # ----------------------- Standalone Server Options ------------------------ # # Scurity can be set to user, share(deprecated) or server(deprecated) security = user map to guest = Bad User #============================ Share Definitions ============================== [public] comment = Public Stuff path = /home/test/test writeable = yes public = yes 123456789101112131415161718192021222324252627282930313233343536
# 啟動smb服務(wù) [root@localhost samba]# systemctl start smb [root@localhost samba]# systemctl status smb ● smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2019-04-25 14:44:24 CST; 3s ago Docs: man:smbd(8) man:samba(7) man:smb.conf(5) Main PID: 22111 (smbd) Status: "smbd: ready to serve connections..." Memory: 8.3M CGroup: /system.slice/smb.service ├─22111 /usr/sbin/smbd --foreground --no-process-group ├─22115 /usr/sbin/smbd --foreground --no-process-group ├─22116 /usr/sbin/smbd --foreground --no-process-group └─22117 /usr/sbin/smbd --foreground --no-process-group Apr 25 14:44:24 localhost.localdomain systemd[1]: Starting Samba SMB Daemon... Apr 25 14:44:24 localhost.localdomain smbd[22111]: [2019/04/25 14:44:24.814732, 0] ../lib/util/become_daemon.c:138(daemon_ready) Apr 25 14:44:24 localhost.localdomain smbd[22111]: daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections Apr 25 14:44:24 localhost.localdomain systemd[1]: Started Samba SMB Daemon.12345678910111213141516171819202122
[root@localhost share]# smbpasswd -a test Unknown parameter encountered: " map to guest" Ignoring unknown parameter " map to guest" New SMB password: Retype new SMB password: Failed to add entry for user test.123456
[root@localhost share]# groupadd test -g 6000 [root@localhost share]# useradd test -u 6000 -g 6000 -s /sbin/nologin -d /dev/null useradd: warning: the home directory already exists. Not copying any file from skel directory into it.12345
[root@localhost share]# smbpasswd -a test Unknown parameter encountered: " map to guest" Ignoring unknown parameter " map to guest" New SMB password: Retype new SMB password: Added user test.1234567
[root@localhost samba]# smbpasswd -x test Deleted user test.1234
在windows輸入\\19.6.6.192 然后輸入設(shè)置的用戶名和密碼就可以了,并且可以將連接的文件夾映射為網(wǎng)絡(luò)驅(qū)動器,這樣就可以直接操作了1234
以上就是centos7中如何安裝samba,小編相信有部分知識點可能是我們?nèi)粘9ぷ鲿姷交蛴玫降?。希望你能通過這篇文章學(xué)到更多知識。更多詳情敬請關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。