LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-01-2003, 04:40 AM   #1
msamd
LQ Newbie
 
Registered: Nov 2003
Posts: 5

Rep: Reputation: 0
Samba as a Windows PDC


hi,

Iam trying to set up my samba server to run as a pdc for my windows systems I can get a password prompt to join the domain. But on w2k system it tells me that Iam using a computer account to use global or local, and om winxp, it tells me I still have active shares when I dont. Here is a copy of my smb.conf cand some one tell me what Iam doing wrong and help me fix it.


thanks,
# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2003/12/01 05:33:23

# Global parameters
[global]
workgroup = MSHOME
netbios name = MSHOME-MDL
server string = Samba Server
encrypt passwords = Yes
unix password sync = Yes
admin log = Yes
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
domain logons = Yes
os level = 64
domain master = Yes
dns proxy = No
username = brent
admin users = brent
printer admin = @adm
printing = cups

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

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm root
guest ok = Yes

[pdf-generator]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &

[Software]
path = /usr/software/
read only = No

[NETLOGON]
path = /usr/local/NETLOGON/
read only = No
 
Old 12-01-2003, 06:59 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
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


Do yourself a favor and use the automated approach for machine accounts which is to add the following line to the 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

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

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
 
  


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 Version 3.0.2a-UL as PDC + Windows XP saavik Linux - Networking 4 09-25-2005 10:52 AM
Samba PDC with Windows XP ilumin8d Linux - Networking 5 12-23-2003 11:41 AM
Windows Clientes with samba PDC suportecs Linux - Networking 3 06-10-2003 03:58 PM
Windows 2000 Samba PDC BarrySharpen Linux - Networking 6 03-31-2003 08:23 AM
Samba PDC Windows XP kraven Linux - Networking 4 03-25-2003 03:16 PM

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

All times are GMT -5. The time now is 11:59 PM.

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