Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redhat Samba Server and XP 1

Status
Not open for further replies.

darkhonor

IS-IT--Management
Jan 31, 2003
2
US
I know this topic has been posted many of time (I've read almost every one of them), but I have a hum-dinger of a problem. I have an XP Professional workstation I want to connect to my Redhat 8.0 Samba server (version 2.2.7-2). It should be as simple as:

1 - Registry hack on the XP server
[HKEY_LOCAL_MACHINES\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters] "requiressignorseal"=dword:00000000

2 - Configure smb.conf:
# Global parameters
[global]
workgroup = UNDERWORLD
netbios name = SETH
server string = Samba PDC %v %h
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 150
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
logon script = netlogon.bat
logon path = \\%L\Profiles\%U
logon drive = U:
logon home = \\%L\%U
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes
remote announce = 192.168.0.0/24
remote browse sync = 192.168.0.0/24
hosts allow = 192.168.0., 127.0.0.1, 192.168.42.
printing = lprng

[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No

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

[ftp]
comment = Local FTP Directory
path = /var/ftp/
guest account = ftp
read only = No
create mask = 0644
guest only = Yes
guest ok = Yes

[HPDeskJet]
comment = HP DeskJet 5550
path = /var/spool/samba
read only = No
printable = Yes
printer name = HPDeskJet

[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
share modes = No

[Profiles]
path = /home/samba/profiles
browseable = No

3 - Edit my DNS records to include the SRV RR for the domain:
_ldap._tcp.dc._msdcs.underworld. 600 SRV 0 0 389 seth.darkhonor.net.

4 - Create a group account for the machines:
/usr/sbin/groupadd -g 201 machines

5 - Create machine account for the XP box:
/usr/sbin/useradd -g machines -d /dev/null -c "machine nickname" -s /bin/false test$

6 - Create and lock the authentication for the new machine account:
passwd -l test$

7 - Do the same for the smbpasswd database:
/usr/bin/smbpasswd -a -m test

8 - Restart the smb service:
/etc/init.d/smb restart

9 - Test the Samba Server by typing:
smbclient -L seth

and I get the following output:
Anonymous login successful
Domain=[UNDERWORLD] OS=[Unix] Server=[Samba 2.2.7]

Sharename Type Comment
--------- ---- -------
ftp Disk Local FTP Directory
HPDeskJet Printer HP DeskJet 5550
netlogon Disk Network Logon Service
IPC$ IPC IPC Service (Samba PDC 2.2.7 seth)
ADMIN$ Disk IPC Service (Samba PDC 2.2.7 seth)

Server Comment
--------- -------
RA Windows XP Professional
SETH Samba PDC 2.2.7 seth

Workgroup Master
--------- -------
UNDERWORLD SETH


10 - Log onto the XP machine with an administrator account and join the domain.

Well, I've done all of the above, and I still get:
"A domain controller for domain underworld could not be contacted."

With the C:\Windows\debug\dcdiag.txt file stating:
The domain name underworld might be a NetBIOS domain name. If this is the case, verify that the domain name is properly registered with WINS.

If you are certain that the name is not a NetBIOS domain name, then the following information can help you troubleshoot your DNS configuration.

DNS was successfully queried for the service location (SRV) resource record used to locate a domain controller for domain underworld:

The query was for the SRV record for _ldap._tcp.dc._msdcs.underworld

The following domain controllers were identified by the query:

seth.darkhonor.net

Common causes of this error include:

- Host (A) records that map the name of the domain controller to its IP addresses are missing or contain incorrect addresses.

- Domain controllers registered in DNS are not connected to the network or are not running.

For information about correcting this problem, click Help.


Any ideas?
 
Ok, I found out what was causing me some problems. It was 2/3 items.

1 - "Domain Logon = yes" needed to be added to smb.conf (Duh!)

2 - I needed to edit the lmhosts file on the XP box and place it in C:\Windows\system32\drivers\etc with the following contents:
192.168.0.11 seth #PRE #DOM:underworld
192.168.0.11 "UNDERWORLD \0x1c" #PRE
192.168.0.11 "UNDERWORLD \0x1b" #PRE

and 3 - This may or may not have helped, but I add it to solidify the solution, edit /etc/samba/lmhosts on the Linux server to read:
127.0.0.1 localhost
192.168.0.11 seth
192.168.0.11 "UNDERWORLD \0x1c" #PRE
192.168.0.11 "UNDERWORLD \0x1b" #PRE

The last two were discovered examining some Ethereal captures when I tried to connect to the domain. The XP box was looking for the UNDERWORLD\1c (Domain Controller) and even though it received the proper authentication from the DNS server, it was the lmhosts file (and having "Enable LMHOSTS lookup" enabled on the XP box) that cleared up which machine was the DC. Hope this helps someone else out. I may write a quick HOWTO with all of these steps and post it out into the ether just so I can remember what to do next time.

Alex
 
so do i need a dns server to have XP machines log into Samba domain?
 
I use this smb.conf I use roaming profiles I hope this will help.

# Samba config file - ROSHI
# Date: 2002/10/17 08:56:46

# Global parameters
[global]

# Set the machine workgroup, netbios,
# server string, etc...
workgroup = OLDAMERICAN
netbios name = ROSHI
server string = Old American Server on %L (Samba %v)


# Set various password stuff
encrypt passwords = yes
update encrypted = yes
unix password sync = yes
security = user

# Set various log stuff
log level = 1
log file = /var/log/log.%m
max log size = 50

# Socket options
socket options = TCP_NODELAY IPTOS_LOWDELAY

# Set this server as the PDC of the domain
domain logons = yes
domain master = yes

# Set this server as the preferred and
# local master
os level = 255
local master = yes
preferred master = yes

# Set this server to handle roaming profiles
logon path = \\roshi\profile\%U
# logon home = \\roshi\profile\%U
logon script = %U.bat

# Specify domain users/groups that will have
# admin privelages in the domain
# domain admin group = @smbadmin
domain admin group = @smbadmin @samba

# Make this machine a time server
time server = yes


#+================== ROSHI'S GLOBAL====================
# [global]
# workgroup = OLDAMERICAN
# netbios name = ROSHI
# server string = Old American File Server (Samba 2.2.2 on Unix)
# encrypt passwords = Yes
# update encrypted = Yes
# log file = /var/log/sambalogs/log.%m
# max log size = 50
# name resolve order = wins lmhosts hosts bcast
# domain logons = Yes
# security = user
# os level = 255
# local master = Yes
# preferred master = Yes
# domain master = Yes
# wins proxy = Yes
# wins support = Yes
# create mask = 0770
# logon path = \\roshi\profile\%U
# logon script = %U.bat
# time server = Yes
# domain admin group = @ntadmin @samba
#==========================================================


#=============================================================================
# Share Definitions
#=============================================================================

[profile]
comment = User profiles
path = /usr/winshare/profile
read only = No
create mask = 0600
directory mask = 0700
browseable = No
writeable = Yes


#=========== ROSHI'S PROFILE ===============
#[profile]
# comment = User profiles
# path = /usr/winshare/profile
# create mode = 0600
# directory mode = 0700
# writeable = Yes
# browseable = No
# valid users = @samba @ntadmin
#===========================================

[netlogon]
comment = The domain logon service
path = /usr/winshare/netlogon
public = no
browsable = no
valid users = @samba @smbadmin

#============= ROSHI's ====================
#[netlogon]
# comment = The domain logon service
# path = /usr/winshare/netlogon
# public = No
# writeable = No
# browsable = No
#===========================================




#======== ROSHI'S USER SHARES ===========



[archives]
comment = Archives Directory
path = /usr/winshare/archives
valid users = @samba
force group = samba
writeable = Yes
force create mode = 0770
force directory mode = 0770
directory mask = 0770
hosts deny =

[backup]
comment = Temporary Backup Directory
path = /usr/winshare/backup
valid users = @samba
force group = samba
writeable = Yes
force create mode = 0770
force directory mode = 0770
directory mask = 0770
hosts deny =

[countrydocs]
comment = Countryside Realty Documents Directory
path = /usr/winshare/countrydocs
valid users = @countryside
force group = countryside
writeable = Yes
directory mask = 0770
force directory mode = 0770
force create mode = 0770
hosts deny =

[data]
comment = General Data Directory
path = /usr/winshare/data
valid users = @smbadmin
force group = oldamerican
writeable = Yes
force directory mode = 0770
hosts deny =
force create mode = 0770

[install]
comment = Install Files Directory
path = /usr/winshare/install
valid users = @samba
force group = samba
writeable = Yes
directory mask = 0750
force directory mode = 0750
force create mode = 0750
hosts deny =

[loans]
comment = Point Loans Data Directory
path = /usr/winshare/loans
valid users = @oldamerican
force group = oldamerican
writeable = Yes
directory mask = 0770
force directory mode = 0770
force create mode = 0770
hosts deny =

[oldamdocs]
comment = Old American Documents Directory
path = /usr/winshare/oldamdocs
valid users = @oldamerican
force group = oldamerican
writeable = Yes
directory mask = 0770
force directory mode = 0770
force create mode = 0770
hosts deny =

[pnttempl]
comment = Point Templates Directory
path = /usr/winshare/pnttempl
valid users = @oldamerican
force group = oldamerican
writeable = Yes
directory mask = 0770
force directory mode = 0770
force create mode = 0770
hosts deny =

[quickbooks]
comment = QuickBooks Data Directory
path = /usr/winshare/quickbooks
valid users = @quickbooks
force group = quickbooks
writeable = Yes
directory mask = 0770
force directory mode = 0770
force create mode = 0770
hosts deny =








(END)

 
you also might try in redhat [service iptables stop] it may be your firewall it was on mine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top