| |
|
Home
|
| Red Hat Linux 8.0: The Official Red Hat Linux Customization Guide |
|---|
| Prev | Chapter 16. Samba | Next |
Configuring Samba Samba uses /etc/samba/smb.conf as its configuration
file. If you change this configuration file, the changes will not take
effect until you restart the Samba daemon with the command
service smb restart.
The default configuration file (smb.conf) in Red Hat Linux
8.0 allows users to view their Linux home directories as a Samba
share on the Windows machine after they log in using the same username
and password. It also shares any printers configured for the Red Hat Linux
system as Samba shared printers. In other words, you can attach a
printer to your Red Hat Linux system and print to it from the Windows machines
on your network.
To specify the Windows workgroup and description string, edit the
following lines in your smb.conf file:
workgroup = WORKGROUPNAME
server string = BRIEF COMMENT ABOUT SERVER |
Replace WORKGROUPNAME with the name of the
Windows workgroup to which this machine should belong. The
BRIEF COMMENT ABOUT SERVER is optional and
will be the Windows comment about the Samba system.
To create a Samba share directory on your Linux system, add the
following section to your smb.conf file (after
modifying it to reflect your needs and your system):
[sharename]
comment = Insert a comment here
path = /home/share/
valid users = tfox carole
public = no
writable = yes
printable = no
create mask = 0765 |
The above example allows the users tfox and carole to read and write to
the directory /home/share, on the Samba server,
from a Samba client.
Samba Passwords In Red Hat Linux 8.0 encrypted passwords are enabled by default because
it is more secure. If encrypted passwords are not used, plain text
passwords are used, which can be intercepted by someone using a
network packet sniffer. It is recommended that encrypted passwords be
used.
The Microsoft SMB Protocol originally used plaintext passwords.
However, Windows 2000 and Windows NT 4.0 with Service Pack 3 or higher
require encrypted Samba passwords. To use Samba between a Red Hat Linux system
and a system with Windows 2000 or Windows NT 4.0 Service Pack 3 or
higher, you can either edit your Windows registry to use plaintext
passwords or configure Samba on your Linux system to use encrypted
passwords. If you choose to modify your registry, you must do so for
all your Windows NT or 2000 machines — this is risky and may cause
further conflicts.
To configure Samba on your Red Hat Linux system to use encrypted passwords,
follow these steps:
Create a separate password file for Samba. To create one
based on your existing /etc/passwd file, at a
shell prompt, type the following command:
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd |
If the system uses NIS, type the following command:
ypcat passwd | mksmbpasswd.sh > /etc/samba/smbpasswd |
The mksmbpasswd.sh script is
installed in your /usr/bin directory with
the samba package.
Change the permissions of the Samba password file so that only
root has read and write permissions:
chmod 600 /etc/samba/smbpasswd |
The script does not copy user passwords to the new file. To
set each Samba user's password, use the command (replace
username with each user's username):
A Samba user account will not be active until a Samba password
is set for it.
Encrypted passwords must be enabled in the Samba
configuration file. In the file smb.conf,
verify that the following lines are not commented out:
encrypt password = yes
smb passwd file = /etc/samba/smbpasswd |
Make sure the smb service is started by
typing the command service smb restart at a
shell prompt.
If you want the smb service to start
automatically, use ntsysv,
chkconfig, or
Services Configuration Tool to enable it at
runtime. Refer to Chapter 13 for details.
 | Tip |
|---|
| | Read
/usr/share/doc/samba-<version>/docs/htmldocs/ENCRYPTION.html
to learn more about encrypted passwords.
(replace <version> with the
version number of Samba that you have installed).
|
The pam_smbpass PAM module can be used to sync
users' Samba passwords with their system passwords when the
passwd command is used. If a user invokes the
passwd command, the password he uses to log in to
the Red Hat Linux system as well as the password he must provide to connect to
a Samba share are changed.
To enable this feature, add the following line to
/etc/pam.d/system-auth below the
pam_cracklib.so invocation:
password required /lib/security/pam_smbpass.so nullok use_authtok try_first_pass |
|
|
|
|
|
|
|
|
Disclaimer: For authoritative source or latest update to this
documentation, please refer to http://www.redhat.com/docs/manuals/linux/ |
|
 |
|
|
|
Quotes: Where a government has come into power through some form of popular vote, fraudulent or not, and maintains at least an appearance of constitutional legality, the guerrilla outbreak cannot be promoted, since the possibilities of peaceful struggle have not yet been exhausted.Whenever death may surprise us, let it be welcome if our battle cry has reached even one receptive ear and another hand reaches out to take up our arms.There are no boundaries in this struggle to the death. We cannot be indifferent to what happens anywhere in the world, for a victory by any country over imperialism is our victory; just as any country's defeat is a defeat for all of us.The amount of poverty and suffering required for the emergence of a Rockefeller, and the amount of depravity that the accumulation of a fortune of such magnitude entails, are left out of the picture, and it is not always possible to make the people in general see this.Many will call me an adventurer - and that I am, only one of a different sort: one of those who risks his skin to prove his platitudes.Whoever, in middle age, attempts to realize the wishes and hopes of his early youth, invariably deceives himself. Each ten years of a man's life has its own fortunes, its own hopes, its own desires.Life belongs to the living, and he who lives must be prepared for changes.Fools and sensible men are equally innocuous. It is in the half fools and the half wise that the danger lies.Destiny grants us our wishes, but in its own way, in order to give us something beyond our wishes.We must learn to be still in the midst of activity and to be vibrantly alive in repose.There is certainly no absolute standard of beauty. That precisely is what makes its pursuit so interesting.The conventional view serves to protect us from the painful job of thinking.Power is not something that can be assumed or discarded at will like underwear.People are the common denominator of progress. So - no improvement is possible with unimproved people, and advance is certain when people are liberated and educated.Faced with the choice between changing one's mind and proving that there is no need to do so, almost everyone gets busy on the proof.It is a far, far better thing to have a firm anchor in nonsense than to put out on the troubled sea of thought.The world is full of willing people, some willing to work, the others willing to let them.
|
|
|
|
|
|
|