Work In Progress

Operating System:
Centos 5.1
All updates installed at time of writing.
Static IP address.
Hostname: samba
Domainname (the one used for windows): HOMEDOMAIN

Prerequisites:
* samba
* samba-common
* samba-client
* samba-swat

Or packages:

* samba-client-3.0.28-1.el5_2.1
* samba-swat-3.0.28-1.el5_2.1
* samba-common-3.0.28-1.el5_2.1
* samba-3.0.28-1.el5_2.1

Installation:

Install the packages:
yum install samba samba-common samba-client samba-swat

Start samba as service on boot:
chkconfig --levels 235 smb on

Start samba service:
service smb start

Basic Swat setup:

During this howto I barely used Swat. Mostly because the settings I used in the conf were getting destroyed by it during the commits. Thus use of Swat will be limited.

Edit swat's service config:

vi /etc/xinet.d/swat

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 = 192.168.0.101

}

Note: The default has only_from = localhost I chose my workstation's IP since I would prefer to do most of my work over SSH in a terminal.

Start Swat/restart xinet.d:

service xinetd restart

Now on the machine you allowed to reach swat in your preferred browser navigate to http://your_IP_here:901 and logon with your root credentials.

Note: This is not secure, and setting up SSH or https is NOT covered in this howto.

Configuring Samba

Edit smb.conf

vi /etc/samba/smb.conf
[global]
workgroup = HOMEDOMAIN
time server = Yes
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
passdb backend = tdbsam
time server = Yes
add user script = /usr/sbin/useradd "%u" -n -g users
add group script = /usr/sbin/groupadd "%g"
add machine script = /usr/sbin/useradd -d /dev/null -g samba-clients -s /bin/false -M %u
domain logons = Yes
os level = 65
preferred master = Yes
wins support = Yes
ldap ssl = no
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[netlogon]
path = /home/samba/netlogon
guest ok = Yes

[profiles]
path = /home/samba/profiles
read only = No
create mask = 0600
directory mask = 0700

Make the following directories:

mkdir -p /home/samba/netlogon
mkdir -p /home/samba/profile
chmod -R 0755 /home/samba

Add User Using CMD

useradd fox -n -g users

passwd fox

-> Enter the password for the new user

Now add the user to the Samba user database.

smbpasswd -a fox

-> Enter the password for the new user

Help Scripting User Creation:

useradd fox -n -g users -p shoes
echo "shoes" > /tmp/passwd
echo "shoes" >> /tmp/passwd
smbpasswd fox -s < /tmp/passwd
smbpasswd -e fox

Add User to Samba Using Swat:

In your browser navigate to the swat webconsole, then to the Password tab.

1. In the usertab type in your desired username - I used Administrator and give it a password.
2. Then hit the enable button when Administrator is listed in the username field and presto completed.

Windows 200x and Windows XP Professional - Adding to the domain:

For the 200x and XP Professional versions of Windows:

1. As Administrator user, go to start > right click on "My computer" and goto properties.
2. Click on the 'Network Identification' or 'Computer Name' tab on the top.
3. Click the "Properties" button.
4. Click on the "Member of Domain" button.
5. Also enter your domain name and computer name and then click "OK"
6. 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 and your local password. A "Welcome to HOMEDOMAIN" message will popup and tell you that your computer has now been added to the domain.
7. Reboot.

Log onto the Windows workstation as the local user Administrator, then open a cmd shell, then execute:

net localgroup administrators /add domain_name\entity

where entity is either a domain user or a domain group account name. To make the user Administrator@HOMEDOMAIN replace entity with Administrator.

References:
http://us3.samba.org/samba/
http://www.freeos.com/articles/3842/
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch10_:_W...
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html

Did you call your domain


Did you call your domain HOMEDOMAIN under the directive:

[global]
workgroup = HOMEDOMAIN

Otherwise when you run the following command on the client:

net localgroup administrators /add HOMEDOMAIN\Administrator

A useful link


hi i go through the process above and did all the above mentioned procedures.But at the end when i configuring the windows i got an error "the following error occurred attempting to join the domain "HOMEDOMAIN":THE NETWORK PATH WAS NOT FOUND" can you help me resolving this error.
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Navigation
Syndicate
Syndicate content
Share this
Powered by Drupal, an open source content management system