SAMBA PDC
SAMBA PDC 0 Comments »- samba rpms
- samba
- samba-common
- samba-client
- samba-swat
-
Installation of samba RPMs :
[root@dc ~]# rpm –ivh samba*
Or
[root@dc ~]# yum install samba*
You can configure Samba to start at boot time using the chkconfig command:
[root@dc ~]# chkconfig smb on
You can start/stop/restart Samba after boot time using the smb initialization script as in the examples below:
[root@dc ~]# service smb start
[root@dc ~]# service smb stop
[root@dc ~]# service smb restart
Sometimes Samba may have an ancillary nmb daemon that also needs to be started. The syntax is the same as that for the smb daemon.
[root@dc ~]# service nmb start
[root@dc ~]# service nmb stop
[root@dc ~]# service nmb restart
- The /etc/samba/smb.conf file is the main configuration file you'll need to edit
-
SWAT, Samba's web based configuration tool enables you configure your smb.conf file without you needing to remember all the formatting. Each SWAT screen is actually a form that covers a separate section of the smb.conf file into which you fill in the desired parameters. For ease of use, each parameter box has its own online help.
-
The enabling and disabling, starting and stopping of SWAT is controlled by xinetd, via a configuration file named /etc/xinetd.d/swat. Here is a sample:
service swat
{
port = 901
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
only_from = localhost
}
[root@dc ~]# service xinetd start
[root@dc ~]# service xinetd stop
[root@dc ~]# service xinetd restart
[root@dc ~]# chkconfig xinetd on
To activate SWAT use:
[root@dc ~] chkconfig swat on
-
Here's how to set the values using SWAT.
- Log into SWAT and click on the [global] section.
- Click the Advanced button to see all the options.
- Make your changes and click on the Commit Changes button when finished.
- Your smb.conf file should resemble the example below when you're finished. You can view the contents of the configuration file by logging in to the samba server via a command prompt and using the cat /etc/samba/smb.conf to verify your changes as you do them.
[global]
workgroup = MSOFTSERVER
time server = Yes
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
smb passwd file = /etc/samba/smbpasswd
private dir = /etc/samba
-
How To Create A Samba PDC Administrator User
To do both SWAT and user administration with Samba you'll need to create administrator accounts on the Samba PDC Linux server.
Home Environment
By default, the root user is the Samba administrator, and SWAT requires you to use the Linux root password to be used. Fortunately, you can add workstations to the Windows domain by creating a Samba specific root password. This is done using the smbpasswd command.
[root@dc ~]# /usr/bin/smbpasswd -a root password
How To Add Workstations To Your Samba Domain
Dynamic Creation of Machine Trust Accounts
Although you can use the manual method, the recommended way of creating machine trust accounts is simply to allow the Samba server to create them as needed when the Windows clients join the domain which known as making a machine account on the fly. You can set this up by editing the /etc/samba/smb.conf file to automatically add the required users.
The easiest way to do this using SWAT in the Global menu to modify the add machine script parameter.
[global]
# <...remainder of parameters...>
add machine script = /usr/sbin/useradd -d /dev/null -g samba-clients -s /bin/false -M %u
When you have completed the modifications, you'll need to create the samba-clients Linux group that will be used to help identify the all the domain's Windows clients listed in the /etc/passwd file.
[root@dc ~]# groupadd samba-clients
Windows XP Professional
For the 200x and XP Professional varieties of Windows, create a dynamic Samba machine trust account, then go through these steps:
- Press the Windows and Break keys simultaneously to access the System Properties dialogue box.
- Click on the 'Network Identification' or 'Computer Name' tab on the top.
- Click the "Properties" button.
- Click on the "Member of Domain" button.
- Also enter your domain name and computer name and then click "OK"
- You will be prompted for a user account and password with rights to join a machine to the domain. Enter the information for your Samba administrator. In this home environment scenario, the user would be root with the corresponding smbpasswd password. Now, you should get a "Welcome to
" message confirming that you've been added. - Reboot.
Log in using any account in the /etc/smbpasswd file with your domain as the domain name.
How To Add Users To Your Samba Domain
Adding users to a domain has three broad phases. The first is adding a Linux user on the Samba server, the second is creating a Samba smbpasswd that maps to the new Linux user created previously, and the third is to map a Windows drive letter to the user's Linux home directory. Let's take a closer look:
Adding The Users In Linux
First, go through the process of adding users in Linux just as you would normally. Passwords won't be necessary unless you want the users to log in to the Samba server via telnet or ssh.
Create the user
To create the user, use the command:
[root@dc ~]# useradd -g 100 peter
Give them a Linux Password
Giving them a Linux password is only necessary if the user needs to log into the Samba server directly. If the user does, use this method:
[root@dc ~]# passwd peter
Changing password for user peter.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@dc ~]#
Mapping The Linux Users To An smbpassword
Next, you need to create Samba domain login passwords for the user
[root@dc ~]# smbpasswd -a username password
The -a switch adds the user to the /etc/smbpasswd file. Remember the smbpasswd sets the Windows Domain login password for a user, which is different from the Linux login password to log into the Samba box.
How To Delete Users From Your Samba Domain
Deleting users from your Samba domain is a two stage process in which you have to remove the user from the Linux server and also remove the user's corresponding smbpasswd entry. Here's how:
1. Delete the users using the smbpasswd with the -x switch
[root@dc ~]# smbpasswd -x john
Deleted user john.
[root@dc root]#
2. Delete The Linux User by following the normal deletion process. For example, to delete the user john and all john's files from the Linux server use:
[root@dc ~]# userdel -r john
NOTE:
Command for assigning of IP address & Hostname (using GUI tool).
[root@dc ~]# sytem-config-network
Host name: dc.msoftserver.com
For further reference visit
www.linuxhomenetworking.com
0 Responses to "SAMBA PDC"
Post a Comment