Ubuntu 16 cheap samba

sudo apt-get install samba install samba

Originally wanted to use the graphical interface to configure, but run

system-config-samba failed

configure manually,

Here the system user name is sjj, and the samba account created is also sjj, but it is best not to be the same for security.

 

sjj@uu:~$ su root For convenience, direct root privileges

password: ******

 

Regardless of the 3721 backup samba configuration file

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup

 

Then add a samba account and password to the samba account database, this account is an existing system user

root@uu:/home/sjj# cat /etc/passwd | mksmbpasswd > /etc/samba/smbpasswd

root @ uu: / home / sjj # smbpasswd -a sjj 

New SMB password:******

Retype new SMB password:******

Added user sjj.

 

 

Then modify the samba configuration file

sudo vi /etc/samba/smb.conf

Add the following key value at the end of the file

[sjj]

workgroup = WORKGROUP

security = sjj

netbios name = sjj

comment = sjj home

path = / home / sjj

browsable = yes

writeable = yes

read only = no

 

Several of the above items are not necessarily required

 

Restart or start the samba service

sudo /etc/init.d/smbd restart

or

sudo service  smbd restart

 

Close the samba service

sudo  /etc/init.d/smbd stop

or

sudo service  smbd stop

sudo smbcontrol smbd shutdown 

 

View samba network connections

netstat | grep samba

View smab process

ps -aux | grep smbd

If the samba service is running normally, you will see at least 3 network connections or at least 3 service processes

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326394696&siteId=291194637