LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2003, 09:13 PM   #1
freezer
LQ Newbie
 
Registered: Dec 2003
Posts: 7

Rep: Reputation: 0
Question samba pdc HELP!


I am having a heck of a time getting this to work. (this is my home network)

I have a very simple smb.conf file: (I have tried many others I have found on the net but all give the same result)

[global]
security = user
status = yes
workgroup = friesnet
netbios name = server
encrypt passwords = yes
domain logons = yes
domian master = yes
domain admin group = @adm
os level=65

I have setup machine and user accounts on the server.

I have setup lmhosts on xp and the hosts on the server all pc's having static ip addresses.

Whin i click on "Network Servers" on the server, i can see my current workgroup and i can see friesnet and in friesnet i see server. On xp, i can see friesnet but I can not open the folder says it is not accessable.

I can ping all pc's by ip as well as by name.

When i try to join the xp box to the domain, i get a pop up that says that the domain controller for the domain could not be contacted.

I have already spent waaaaaaay tooooo much time trying to figure this out... I really need some help!

On the server i can see to friesnet and
 
Old 12-09-2003, 09:58 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
See if my notes will be of any help for you.

Check out the tutorial from this site....
http://www-1.ibm.com/servers/esdd/tu...mba/index.html

Here are the important areas which I use.

groupadd -g 200 admins
groupadd -g 201 machines

mkdir -m 0775 /home/netlogon
chown root.admins /home/netlogon

mkdir /home/samba /home/samba/profiles
chmod 1757 /home/samba/profiles

The automated approach for machine accounts is to add the following line to the /etc/smb.conf
( Note: that is supposed to be all one line )
add user script = /usr/sbin/useradd -d /dev/null -g machines -s /bin/false -M %u

____________________________________________________________

In some cases, the Windows machine refuses to join the Samba domain. Then the manual approach is needed also. Use the following commands while logged in as the root user.
Note: replace the machine_name$ with the actual name which you have given the computer. Keep the $ after the name as required.


/usr/sbin/useradd -g machines -d /dev/null -s /bin/false machine_name$

passwd -l machine_name$
You should see something like this....
Locking password for user machine_name$
passwd: Success

Now add a samba password for the machine.
smbpasswd -a -m machine_name$
You should see something like this....
Added user machine_name$

____________________________________________________________

Add the user accounts ( Fred in my case ) and set the passwords
useradd fred
passwd fred
New password:
Retype password:

smbpasswd -a fred
New SMB password:
Retype SMB password:

************************************************************
This part is very important for joining the domain from Windows.
When you get to the part on a Windows computer where it asks for the person who is authorized to join computers to the domain, I use the root user and password.

Give the root / admin user a samba password!!
smbpasswd -a root
New SMB password:
Retype SMB password:


Below is my smb.conf which works very nicely with those instructions.

_______________________________________________________________________
[global]
workgroup = mydomain.com
server string = Samba Server
hosts allow = 192.168.0. 192.168.1. 127.
printcap name = /etc/printcap
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
max log size = 50
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

pam password change = yes
username map = /etc/samba/smbusers
include = /etc/samba/smb.conf.%m
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = yes
os level = 64
domain master = yes
domain logons = yes

logon home = \\%L\%U
; logon drive = H:
logon path = \\%L\Profiles\%U
add user script = /usr/sbin/useradd -d /dev/null -g machines -s /bin/false -M %u

dns proxy = no

[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# If you want users samba doesn't recognize to be mapped to a guest user
; map to guest = bad user

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = yes
browseable = no
write list = fred

[Profiles]
path = /home/samba/profiles
writeable = yes
browseable = no
create mask = 0600
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
 
Old 12-11-2003, 09:19 AM   #3
freezer
LQ Newbie
 
Registered: Dec 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Still does not work... I just dont have enough time to mess with this anymore... So back to M$ I go... Thanks for the help though!
 
Old 12-12-2003, 04:31 PM   #4
goochster
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Rep: Reputation: 0
Hey I have had the Same problem but I have two computers on a small network I created. I have a lInux Redhat 8.0 with Samba3.0v1 and my other computer is a Windows 2000. I have completed Homey's Tutorial to a tea and everything seemed to work fine. I have did all the neccessary test on the Linux box and can ping by name and domain. I go to my win2000 box and I try and Join the Domain and I get the Domain Does not exist or could not be contacted, but If i join as a Workgroup on my 2k box then I can see my share name on the Linux Box and can add files to it. But will not Join as a Domain. I need some help Cause I want to convert my larger business network to Linux PDC and get off Microsoft.
 
Old 12-12-2003, 05:50 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Did you create the samba password for root?
smbpasswd -a root
New SMB password:
Retype SMB password:

And did you remember to restart samba with the command:
service smb restart

Edit: Check this.....

This is the section on getting your W2k box to join the samba domain.
The computer name is mybox, the user is Fred and root is still root or admin or administrator or even Saint Nick.....

At the linux server, type:

/usr/sbin/useradd -g machines -d /dev/null -s /bin/false mybox$

Now type:
passwd -l mybox$
You should see something like this....
Locking password for user mybox$
passwd: Success

Now add a samba password for the machine with the command:
smbpasswd -a -m mybox$
You should see something like this....
Added user mybox$

Give the root / admin user a samba password with the command:
smbpasswd -a root
New SMB password:
Retype SMB password:

Restart the samba service with the command:
service smb restart

Now go to the client computer. In this case a W2k box.

Right click on My Network Places / Properties
Select the Advanced Tab / Network Identifcation...
Select the Properties button
Check the following is correct....
Computername: mybox
Member of Workgroup:Workgroup


If that is ok, ( I'll start over here so you know where I am at )

Right Click on My Network Places / Properties
Select the Advanced Tab / Network IDbutton
Next
select "This computer is part of a business network and I use it to connect to other computers at work"
Next
select "My company uses a network with a domain"
Next
Next
User Account and Domain Information
User name: Fred
Password: mypassword
Domain:mydomain.com
Next
Computer Domain
Computer name:mybox
Computer domain:mydomain.com
Next
Note: this is where you need the root samba account
Domain User Name and Password
"Type the name and password of an account with permissions to join the domain"
User name: root
Password:the smb password for root
Domain:mydomain.com
OK
And of course reboot!
Now when it reboots, you can log on as Fred or someone who has a Linux and Samba account. Also needs a smb password!






Last edited by homey; 12-12-2003 at 07:03 PM.
 
Old 12-15-2003, 08:44 AM   #6
goochster
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Rep: Reputation: 0
Ok yea I have did that and still no luck. Keeps telling me it doesn't find my domain. No domain can be contacted. I posted a new thread on this on the 13 I have put my smb.conf file as well as my error messages. IF you could please check that out. I would appreciate it. I have restarted samba and restarted my computer as well...but still recieve the no domain server can be found when I try and log on to the domain. That is by saying...on the w2k box I right click on my computer go down where you can put in the domain to join. I throw in there the domain and it says no domain can be found. But if I put the workgroup name in I can connect to the linux box fine. But I don't want it as a workgroup I want it as a domain.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba 3 problem - samba PDC can not join to the domain ananthak Linux - Networking 1 05-21-2006 10:39 AM
samba PDC ilnli Linux - Software 1 11-21-2005 06:59 AM
samba pdc citrus Linux - Networking 3 05-24-2004 01:19 AM
Samba as a PDC bLaDe Linux - Networking 14 09-18-2003 04:06 PM
samba pdc gauge73 Linux - Networking 0 02-18-2003 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration