In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to configure Samba file sharing service in Ubuntu18. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Install Samba
# install demo@ubuntu:~$ sudo apt install samba-y # firewall through demo@ubuntu:~$ sudo ufw allow 'samba'
Specify shared folder
# the current user is demo. The permission to establish a shared folder demo@ubuntu:~$ mkdir / samba_share# samba_share folder under the home directory of demo is as follows: owner | group | otherdemo@ubuntu:~$ ls-ltotal 8drwxrwxr-x 2 demo demo 4096 Oct 4 06:08 samba_sharedrwxrwxr-x 3 demo demo 4096 Oct 3 12:39 software
Set up samba user
# set an ordinary user sam, this user does not need to specify the directory and shelldemo@ubuntu:~$ sudo useradd sam# to set the password of sam, enter 2 times to confirm that demo@ubuntu:~$ sudo passwd sam# because there is no group to specify sam, so sam belongs to the sam group, with the same name as the user name # according to the folder permissions above, the user only has the permission to read and execute # add samba user, samba is based on system user Therefore, the system user must be established before you can add the samba user demo@ubuntu:~$ sudo smbpasswd-a sam# to enter the password twice, which can be inconsistent with the system account, and the samba account has nothing to do with the system account.
Modify samba configuration
Demo@ubuntu:~$ cd / etc/samba/# backup configuration demo@ubuntu:/etc/samba$ sudo cp smb.conf smb.conf.bak# modify configuration demo@ubuntu:/etc/samba$ sudo vim smb.conf# add shared configuration at the end of configuration # name of shared display [share] # description Free to fill in the absolute path of comment = SambaShare # shared folder path = / home/demo/samba_share # everyone visible public = yes # whether writable = yes # File permissions create mask = 0700 # folder permissions directory mask = 0700 # users allowed to access, separated by commas Add group'@ + group name 'valid users = @ demo, whether sam # resource is available available = yes # can browse browseable = yes # set Chinese to display correctly display charset = utf-8 unix charset = utf-8 doc charset = uft-8 [share] comment = SambaShare path = / home/demo/samba_share public = yes writable = yes create mask = 0700 directory mask = 0700 valid users = @ demo Sam available = yes browseable = yes display charset = utf-8 unix charset = utf-8 doc charset = uft-8# restart service demo@ubuntu:~$ sudo / etc/init.d/smbd restart
After configuration, you can use the\\ IP address on Windows to access the share. If you need to enter a user name and password for the pop-up, fill in the user name and password of the newly created samba user.
If using sam users can only access but not write, you can add sam users to the demo group
# add user sam to demo group demo@ubuntu:~$ sudo usermod-g demo sam# set sam users from logging in to shelldemo@ubuntu:~$ sudo usermod-s / usr/sbin/nologin sam to read the above content, do you have any further understanding of how to configure Samba file sharing service in Ubuntu18? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.