Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing samba Server in Ubuntu to create File sharing

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install samba server in Ubuntu to create file sharing". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn "how to install a samba server in Ubuntu to create file sharing".

Set up sharing under ubuntu

1. Install samba

Sudo apt-get install samba smbfs

two。 Set samba password

Sudo touch / etc/samba/smbpasswd

Sudo smbpasswd-a yourname # yourname indicates your user name

Then follow the prompt to set up and enter the password

3. Choose any folder you want to share, right-click "Properties", and then click "Share"

4. Enter the shared name, which usually has the same name as the folder. If you make a mistake in the third step below, please try changing the name.

5. Select the first option "share this fold", the second can also be selected, and the third is not recommended.

Application sharing

If you are accessing the created share in windows, take XP as an example, open the my computer tool Map Network Drive

Enter your shared address in the folder box.

Your mapped address is "\\ ubuntu-IP\ sharename", ubuntu-IP is the IP address of your ubuntu host, and sharename is the share name you entered in step 3 above.

Then follow the prompts to enter the user name and shared password.

If you are on a linux system, you can access the share you created through the mount command:

Sudo mount / / ubuntu-IP/sharename share_temp/-o username=yourname,password=yourpasswd,fmask=777,dmask=777

Share_temp is your local folder, which is where the share is temporarily placed.

Description:

1. The shared password is the password you set in the previous two steps, which is independent of your password when you log in to the ubuntu host, but the user name is the same.

two。 Note that Windows and linux access are slash in different directions

How to establish sharing for ordinary users under ubuntu

When an ordinary user logs in and creates a shared folder as described above, an error will be prompted:

'net usershare' returned error 255: net usershare: cannot open usershare directory / var/lib/samba/usershares. Error Permission denied

You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share. At this point, you only need to join the user to the sambashare user group as follows:

Sudo adduser yourname sambashare

Log in again after logout and you can set up the shared folder.

However, you can't apply your share at this time, you need to set your samba password first.

Sudo smbpasswd-a yourname

Then follow the prompts to set your samba password.

At this point, I believe you have a deeper understanding of "the method of installing samba server in Ubuntu to create file sharing". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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: 272

*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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report