如何在Centos(Amazon Ami 2)上设置桑巴服务器?

c7rzv4ha  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(185)

我试图在aws上为windows设置Fsx,但它是昂贵的,所以我需要帮助在centos/亚马逊Linux 2上设置samba服务器,并将其Map为windows网络驱动器。

vsmadaxz

vsmadaxz1#

打开端口445(SMB端口)以允许访问。

sudo yum install samba   
sudo service smb restart 
sudo adduser test 
sudo smbpasswd -a test 
echo "[global] 
        disable spoolss = Yes 
        dns proxy = No 
        load printers = No 
        log file = /var/log/samba/log.%m 
        map to guest = Bad User 
        max log size = 1000 
        obey pam restrictions = Yes 
        pam password change = Yes 
        panic action = /usr/share/samba/panic-action %d 
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:                                                                                                             * %n\n *password\supdated\ssuccessfully* . 
        passwd program = /usr/bin/passwd %u 
        printcap name = /dev/null 
        security = USER 
        server string = %h server 
        syslog = 0 
        unix password sync = Yes 
        idmap config * : backend = tdb 
[test] 
        comment = test Share 
        create mask = 0664 
        directory mask = 0775 
        max connections = 8 
        path = /home/test 
        read only = No 
        valid users = test 
" >> /etc/samba/smb.conf 

sudo service smb restart

将此Map到Windows服务器
1.将您的centos本地ip与(ip addr)一起使用
1.在Windows中打开此PC,然后单击左上角的计算机
1.单击Map网络驱动器
1.添加\localip[概要文件的名称]在本例中为\localip\test
1.检查使用不同凭据的连接
1.使用安装过程中创建的凭据

相关问题