ข่าว: ข่าวประกาศ

  • 27 พฤศจิกายน 2024, 08:21:31

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ผู้เขียน หัวข้อ: Basic Samba Setup in Ubuntu 9.10 Karmic Koala  (อ่าน 12999 ครั้ง)

admin

  • Administrator
  • Hero Member
  • *****
  • กระทู้: 3820
    • ดูรายละเอียด
    • อีเมล์
Basic Samba Setup in Ubuntu 9.10 Karmic Koala
« เมื่อ: 07 พฤษภาคม 2010, 21:04:40 »
Ubuntu 9.10 Karmic Koala has come out, and that means it’s time to explain how to do a basic Samba setup on the new version. All Terminal commands in this walkthrough are bolded, and USERNAME stands for your username on your Ubuntu system.

First, you’ll need to install Samba. Fire up a Terminal window and use this command:

sudo apt-get install samba

Follow the default prompts to install Samba. Now, Samba uses a separate set of passwords than the standard Linux system accounts (stored in /etc/samba/smbpasswd), so you’ll need to create a Samba password for yourself with this command:

sudo smbpasswd -a USERNAME

(USERNAME, of course, is your actual username.)

Type a suitably strong password (make sure it includes uppercase, lowercase, punctuation, and numbers). Once your password is created, the next step is to edit your /etc/samba/smb.conf file, the configuration file for Samba. Begin by creating a folder named ‘test’ on your home folder; we’ll use that for our test shared folder (you can create other shared folders using the same method):

mkdir /home/USERNAME/test

Next, make a safe backup copy of the original smb.conf file to your home folder, in case you make an error:

sudo cp /etc/samba/smb.conf ~

Now use your text editor of choice to edit smb.conf:

sudo gedit /etc/samba/smb.conf

(New users will probably find gedit the easiest to use due to its GUI; but you can use emacs or vi just as readily, especially if you’re using the server version of Ubuntu, which doesn’t include X11 by default.)

Once smb.conf has loaded, add this to the very end of the file:

[test]
path = /home/USERNAME/test
available = yes
valid users = USERNAME
read only = no
browsable = yes
public = yes
writable = yes


(There should be no spaces between the lines, and note also that there should be a single space both before and after each of the equal signs.)

These settings will share the test folder we created earlier, and give your username and your username alone permission to read and write to the folder. Once you have input the changes, save smb.conf, exit the text editor, and restart Samba with this command:

sudo /etc/init.d/samba restart


Once Samba has restarted, use this command to check that your smb.conf doesn’t contain any syntax errors:

sudo testparm

If you pass the testparm command, Samba should be working; try accessing the shared folder from another computer on your LAN.

Reff :: http://www.jonathanmoeller.com/screed/?p=1168

<a href="http://www.hadyaiinternet.com/images/inetcafe.swf" target="_blank" rel="noopener noreferrer" class="bbc_link bbc_flash_disabled new_win">http://www.hadyaiinternet.com/images/inetcafe.swf</a>


There are no comments for this topic. Do you want to be the first?