pi 4b build smb remove file manage system_SMBA

[col]

fdisk -l

support your disk is sda

mkfs -t ext4 /dev/sda1

mount /dev/sda1/remove_file

mount /dev/sda1 /remove_file_magage

if pass, log will below:

/dev/sda1 220G 61M 208G 1% /remove_file_magage

vi /etc/fstab

/dev/sda1 /remove_file_magage ext4 defaults 1 1

Vim 全选的cmd

ggv

ls -l -a

apt install samba samba-common-bin

mkdir data

chown -R root:users /remove_file_magage/data

-R means it is a folder

chmod -R ug=rwx,o=rx /remove_file_magage/data

This might need tweaking when using external authentication schemes

valid users = %S

Un-comment the following and create the netlogon directory for Domain Logons

(you need to configure Samba to act as a domain controller too.)

;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes

Un-comment the following and create the profiles directory to store

users profiles (see the “logon path” option above)

(you need to configure Samba to act as a domain controller too.)

The path below should be writable by all users so that their

profile directory may be created the first time they log on

;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

Windows clients look for this share name as a source of downloadable

printer drivers

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no

Uncomment to allow remote administration of Windows print drivers.

You may need to replace ‘lpadmin’ with the name of the group your

admin users are members of.

Please note that you also need to set appropriate Unix permissions

to the drivers directory for these users to have write rights in it

; write list = root, @lpadmin

[public]
comment = public storage
path = /remove_file_magage/data
valid user = @users
force group = users
create mask = 0660
directory mask =0071
read only = no
~
~

upper come from B:

/etc/init.d/samba-ad-dc restart

smbpasswd -a pi

smb://192.168.1.18

使用rm -rf 目录名字 命令即可删除文件夹-r 就是向下递归,不管有多少级目录,一并删除-f 就是直接强行删除,不作任何提示的意思

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值