[root@localhost ~]# yum install samba Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * c7-media: ... Installed size: 29 M Is this ok [y/d/N]: y Downloading packages: ... Complete!
备份服务配置文件
1 2 3 4
[root@localhost ~]# ls /etc/samba lmhosts smb.conf smb.conf.example [root@localhost ~]# cp /etc/samba/smb.conf /etc/samba/smb.conf.bak [root@localhost ~]# vi /etc/samba/smb.conf
[root@localhost ~]# useradd Apache [root@localhost ~]# passwd Apache Changing password for user Apache. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully.
[root@localhost ~]# pdbedit -a -u Apache new password: retype new password: Unix username: Apache NT username: Account Flags: [U ] User SID: S-1-5-21-2237892677-58617703-3176231605-1000 Primary Group SID: S-1-5-21-2237892677-58617703-3176231605-513 Full Name: Home Directory: \\localhost\apache HomeDir Drive: Logon Script: Profile Path: \\localhost\apache\profile Domain: LOCALHOST Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: Wed, 06 Feb 2036 10:06:39 EST Kickoff time: Wed, 06 Feb 2036 10:06:39 EST Password last set: Wed, 23 Dec 2020 09:13:58 EST Password can change: Wed, 23 Dec 2020 09:13:58 EST Password must change: never Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[root@localhost ~]# systemctl status smb ● smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2020-12-23 09:17:53 EST; 48s ago Docs: man:smbd(8) man:samba(7) man:smb.conf(5) Main PID: 3810 (smbd) Status: "smbd: ready to serve connections..." CGroup: /system.slice/smb.service ├─3810 /usr/sbin/smbd --foreground --no-process-group ├─3812 /usr/sbin/smbd --foreground --no-process-group ├─3813 /usr/sbin/smbd --foreground --no-process-group └─3814 /usr/sbin/smbd --foreground --no-process-group
Dec 23 09:17:53 localhost.localdomain systemd[1]: Starting Samba SMB Daemon... Dec 23 09:17:53 localhost.localdomain smbd[3810]: [2020/12/23 09:17:53.592344, 0] ../../lib/...y) Dec 23 09:17:53 localhost.localdomain systemd[1]: Started Samba SMB Daemon. Dec 23 09:17:53 localhost.localdomain smbd[3810]: daemon_ready: daemon 'smbd' finished star...ns Hint: Some lines were ellipsized, use -l to show in full.