[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 就是直接强行删除,不作任何提示的意思