Samba service configuration in Fedora8

Source: Internet
Author: User
The configuration of Samba service in Fedora8-general Linux technology-Linux technology and application information. The following is a detailed description. [Root @ localhost ~] # Rpm-q samba
[Root @ localhost ~] # Find/media/Fedora \ 8 \ i386 \ DVD/Packages/-name "* samba *"
/Media/Fedora 8 i386 DVD/Packages/samba-3.0.26a-6.fc8.i386.rpm
/Media/Fedora 8 i386 DVD/Packages/samba-client-3.0.26a-6.fc8.i386.rpm
/Media/Fedora 8 i386 DVD/Packages/samba-common-3.0.26a-6.fc8.i386.rpm
/Media/Fedora 8 i386 DVD/Packages/system-config-samba-1.2.58-1.fc8.noarch.rpm
1. Close the fire wall
Iptables-F
2. Set selinux
SELinux has both advantages and disadvantages. Even if you have the root permission, it cannot be messy.
SELinux (Security-Enhanced Linux) is the implementation of mandatory access control by the US National Security Agency (NAS ).®The most outstanding new security subsystem. NSA developed an access control system with the help of the Linux community. Under the restriction of this access control system, processes can only access the files needed in their tasks. SELinux is installed on Fedora and Red Hat Enterprise Linux by default. It can also be easily installed on other distributions.
SELinux is like a firewall. Fedora Core 2 is preset but disabled at the beginning. FC3 is partially enabled.
FC5 is enabled.
SELINUX has three options: "disabled", "permissive", and "enforcing.
Disabled does not need to be said. permissive is effective for Selinux, but even if you violate the policy, it will allow you to continue the operation, but record the content of your violation. It is very useful when developing policies.
It is equivalent to the Debug mode.
Enforcing means that if you violate the policy, you cannot proceed.
/Etc/selinux
[Root @ localhost selinux] # vi config
# This file controls the state of SELinux on the system.
# SELINUX = can take one of these three values:
# Enforcing-SELinux security policy is enforced.
# Permissive-SELinux prints warnings instead of enforcing.
# Disabled-No SELinux policy is loaded.
SELINUX = disabled
# SELINUXTYPE = can take one of these two values:
# Targeted-Targeted processes are protected,
# Mls-Multi Level Security protection.
SELINUXTYPE = targeted
# SETLOCALDEFS = Check local definition changes
SETLOCALDEFS = 0
3. modify directory permissions
[Root @ localhost opt] # cd/
[Root @ localhost/] # cd/opt/
[Root @ localhost opt] # mkdir jw
[Root @ localhost opt] # ll
Total 4
Drwxr-xr-x 2 root 4096 05-17 04: 33 jw
[Root @ localhost opt] # chmod 777 jw
[Root @ localhost opt] # ll
Total 4
Drwxrwxrwx 2 root 4096 05-17 04: 33 jw
Configure share samba
File description
Workgroup = the name of the Working Group that MSHOME adds linux to. I have joined the Working Group MSHOME.
Server string = Samba this is the server description to facilitate resource marking. You can enter
Security = user-shared security level. samba has four security levels:
Share: you can log on to the samba server without your account and password.
User: the samba server that provides services is responsible for checking the account and password (default)
Server: Another windows or samba server is responsible for checking the account and password.
Domain: Specifies the windows domain control server to verify the user's account and password)
[Root @ localhost samba] # pwd
/Etc/samba
# ----------------------- Standalone Server Options ------------------------
Security = share
[Tux]
Path =/opt/jw Note: Set the shared information.
Writable = yes Note: whether users can write data. Here we allow
Guest OK = yes
; Browseable = yes
[Root @ localhost/] #/etc/rc. d/init. d/smb start
Start the SMB service: [OK]
[Root @ localhost/] #/etc/rc. d/init. d/smb stop
Disable the SMB service: [OK]
**************************************** **************************************** **********
Configure user-level samba
[Root @ localhost samba] # vi smb. conf
# ----------------------- Standalone Server Options ------------------------
Security = user
[Tux]
Comment = This is my samba server! Note: Set shared information and enter it at will.
Path =/opt/jw
Valid users = test Note: users who can access the shared directory are set to testuser.
Writable = yes
; Guest OK = yes
[Root @ localhost samba] #/etc/rc. d/init. d/smb restart
Disable the SMB service: [OK]
Start the SMB service: [OK]
Create a system user
[Root @ localhost samba] # useradd test
[Root @ localhost samba] # passwd test
Changing password for user test.
New UNIX password:
Enter a new UNIX Password:
Passwd: all authentication tokens updated successfully.
Update the/etc/samba/smbpasswd file
[Root @ localhost samba] # cat/etc/passwd | mksmbpasswd. sh>/etc/samba/smbpasswd
[Root @ localhost samba] # ls
Lmhosts smb. conf smb. conf. bak smbpasswd smbusers
Create a samba account
[Root @ localhost samba] # smbpasswd-a test
New SMB password:
Retype new SMB password:
Added user test.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.