重庆思庄Oracle、Redhat认证学习论坛

标题: Samba配置 [打印本页]

作者: denglj    时间: 2022-5-27 12:55
标题: Samba配置
服务器端:CentOS 7.9 IP192.168.133.161
客户端:Windows 11
实验目标:安装Samba,实现LinuxWindows之间的文件共享.
安装Samba
[root@hisdb2 ~]# yum -y install samba*
[root@hisdb2 ~]# rpm -qa samba
samba-4.10.16-18.el7_9.x86_64
创建系统用户
[root@hisdb2 ~]# useradd leo
[root@hisdb2 ~]# passwd leo
Changing password for user leo.
New password:
BAD PASSWORD: The password is shorter than8 characters
Retype new password:
passwd: all authentication tokens updatedsuccessfully.
将用户leo添加到smbpasswd
[root@hisdb2 ~]# smbpasswd -a leo
New SMB password:
Retype new SMB password:
Added user leo.
启动Samba服务
[root@hisdb2 ~]# systemctl start smb
[root@hisdb2 ~]# systemctl status smb
● smb.service - Samba SMB Daemon
  Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendorpreset: disabled)
  Active: active (running) since Fri 2022-05-20 22:23:10 CST; 23s ago
    Docs: man:smbd(8)
          man:samba(7)
          man:smb.conf(5)
Main PID: 16475 (smbd)
  Status: "smbd: ready to serve connections..."
   Tasks: 4
  CGroup: /system.slice/smb.service
          ├─16475 /usr/sbin/smbd --foreground --no-process-group
          ├─16481 /usr/sbin/smbd --foreground --no-process-group
          ├─16482 /usr/sbin/smbd --foreground --no-process-group
          └─16483 /usr/sbin/smbd --foreground --no-process-group
May 20 22:23:10 hisdb2 systemd[1]:Starting Samba SMB Daemon...
May 20 22:23:10 hisdb2 smbd[16475]:[2022/05/20 22:23:10.758641,  0]../../lib/util/become_daemon.c:136(daemon_ready)
May 20 22:23:10 hisdb2 smbd[16475]:   daemon_ready: daemon 'smbd' finishedstarting up and ready to serve connections
May 20 22:23:10 hisdb2 systemd[1]: StartedSamba SMB Daemon.
samba服务启动后,windows连接linux