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 09-09-2003, 01:48 AM   #1
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Rep: Reputation: 15
Samba as a PDC


Hi Guys,
I am trying to setup my linux box as a PDC so my windows machines login through the linux box and have found a guide here which I am using.

I get down to where it says you should run testparm to check everything is ok and I get the following error messages

Quote:
Unknown parameter encountered: "login path"
Ignoring unknown parameter "login path"
Unknown parameter encountered: "login script"
Ignoring unknown parameter "login script"
Looking in the smb.conf file I notice
login path = \\%L\profiles\%u\%m
login script = logon.bat

Looking back at the guide is appears to be word for word so I am not sure what has gone wrong or whether it's a different version of Samba that I am running which is 2.27.

My other question is further on down the guide is has the following
Quote:
# mkdir /usr/local/samba/lib/netlogon
# chmod 775 /usr/local/samba/lib/netlogon
# mkdir /home/samba-ntprof
# chmod 777 /home/samba-ntprof
where /usr/local/samba/lib/netlogon can I substitute this as for anything like /home/netlogon ? as long as I make the directory or does it have to be in Samba's directory? Samba isn't located in the /usr/local/samba/lib directory.

I am only a beginner when it comes to Linux and since I had Samba working perfectly I thought I would go that one step further and learn more along the way but as you can see I got a little stuck.

I am running Mandrake 9.0 on the linux box and connected to that are 3 windows xp pro machines on the network with the following IP addresses 192.168.1.1 (server - Linux box), 192.168.1.3 (Win XP #1), 192.168.1.5 (Win XP #2), 192.168.1.8 (Win XP #3) and 192.168.1.10 (Win XP #4).

My full smb.conf file should it be needed can be found here

I know it's a little messy at the moment but I was just estatic getting it working in the first place and haven't had a chance to clean it up and remove what I don't need.

Any help would be very much appreciated.

Cheers
Darren
 
Old 09-09-2003, 05:42 AM   #2
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 33
ad 1 - Its "logon path" and "logon script" not login....

ad 2 - u can use any directory u want, just make sure that everyone can read and execute logon scripts from that dir

Last edited by muah; 09-09-2003 at 05:54 AM.
 
Old 09-09-2003, 05:52 AM   #3
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
haha, excellent find muah. Login and Logon look the same after you've spent hours infront of a computer

Thanks for that
 
Old 09-10-2003, 06:42 PM   #4
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
I am still not sure what goes with the netlogon directory as it could be a reason why I am having problems now or something else.

I have attempted to connect to the domain using the temporary name domain but I get Access Denied messages, now I have done the 'smbpasswd -a root' bit, if I am correct I am setting the samba domain password in the above command? If so, this is the password I am using to connect to the domain but where it is coming up with the Access Denied messages.

I am looking under 'Adding Computer Accounts' in the guide I posted originally and certain bits and pieces don't make sense to me.

For example
Quote:
/usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
Does this simply go in the smb.conf? Does it matter where? I have tried running it but get the following error message appear in the console 'useradd: invalid user name `%u''

Any help on these couple of questions would be greatly appreciated as I've really stretched my knowledge already.

Thanks
Cheers
Darren
 
Old 09-10-2003, 06:52 PM   #5
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
Ouch sounds like Samba guige with thorns attached. Try this guide it made alot sense to be probably because it came from IBM.

http://www-1.ibm.com/servers/esdd/tu...a/samba-a4.pdf


Have Fun!


--tarballedtux
 
Old 09-10-2003, 09:18 PM   #6
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
It didn't seem too bad until I got down to the parts I was having troubles with.

I have had a quick look and read of the pdf, by the look of it, it could be exactly like what I have been chasing down. It also appears to explain why a particular command has to be done which is even better.

Thanks for that.
 
Old 09-10-2003, 10:04 PM   #7
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
All seems good so far until I get down to the section 'Machine Accounts' (Page 18)

It says to type in
Quote:
/usr/sbin/useradd -g machines -d /dev/null -c "machine_id"
So I here I am typing it in like
Quote:
/usr/sbin/useradd -g machines -d /dev/null - c "athlon"
hit enter then it comes back like

Quote:
usage: useradd [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
useradd -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]
I take it machine id is the name of the computer?

Obviously there is something different but I can't workout what it could be, any ideas? Reading on in the next paragraph it mentions -s /bin/false yet I don't see that mentioned in the commands above?

I am a little confused at the moment.

Thanks for the help so far guys.
 
Old 09-11-2003, 03:20 AM   #8
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 33
U need to create machine account for each client PC which will log in to the domain. To do this use useradd command mentioned above but its important to append "\$" to the end of the machine s name (then linux will recognize that it is a machine not normal user)

useradd -g machines -d /dev/null -s /bin/false onion\$

where 'onion' is the name of added machine

then

smbpasswd -a -m onion

Notice that u werent asked for samba password now, u just got a message that user (machine) has been added

Now u need to restart samba service and then u can try to add client computer to the domain (first login has to be made by root)

I would recommend u this guide:
http://www.samba.netfirms.com
which is quite simple, more comprehensive is
http://hr.uoregon.edu/davidrl/samba/
there are also useful tips for troubleshooting
and many good tips which I didnt find in other guides are in the book Using Samba - second edition should be available in html version somewhere on the web, 1st edition is available for free download in pdf
 
Old 09-11-2003, 06:57 PM   #9
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
Hey again Guys,
Well it's working a treat, muah that useradd command has worked first time and I've already written it down for future reference.

I had some problems after adding machine accounts with error messages on the windows boxes saying 'duplicate name exists on the network' but after reading some archived posts I came across one which suggested to change the netbios name to something different to the hostname of the server. After doing that it worked first pop.

A big thank you to both muah & tarballedtux for all of your help, those guides that you posted muah certainly won't go unread as no doubt they could benefit me a great deal in my very very steep learning curve.

Thanks again guys

I'm off to do some ing
 
Old 09-18-2003, 05:43 AM   #10
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
Hi again Guys,
I recently had a hard drive failure to a point where I couldn't recover any data and it just happened to be on my Linux box meaning I lost my whole installation which I was pretty annoyed about.

Anyway I am trying to setup Samba again but have run into problems.

When I attempt to join the domain from WinXP it comes back with a dirty great big message saying the following:

Quote:
A domain controller for the domain Holden could not be contacted

Ensure that the domain name is typed correctly.

If the name is correct, click Details for troubleshooting information.
The host name of my Linux box is Skaifey, if you need any other files to help you a little more I would be happy to hand them over.

I am not too sure where I have gone wrong or whether I have missed something out but I've been trying for the past 4 - 5 hours without any luck.

My samba conf file can be found here

Thanks
Cheers
Darren
 
Old 09-18-2003, 06:12 AM   #11
deflin
LQ Newbie
 
Registered: May 2003
Posts: 6

Rep: Reputation: 0
when you click on Details, does is say something about SRV - records?
 
Old 09-18-2003, 06:15 AM   #12
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
It certainly does.

Here is a copy of the entire spill it gave me.


Note: This information is intended for a network administrator. If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file D:\WINDOWS\debug\dcdiag.txt.

The domain name Holden 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.

The following error occurred when DNS was queried for the service location (SRV) resource record used to locate a domain controller for domain Holden:

The error was: "DNS name does not exist."
(error code 0x0000232B RCODE_NAME_ERROR)

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

Common causes of this error include the following:

- The DNS SRV record is not registered in DNS.

- One or more of the following zones do not include delegation to its child zone:

Holden
. (the root zone)

For information about correcting this problem, click Help.
 
Old 09-18-2003, 06:26 AM   #13
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 33
In one HowTo i mentioned above there is a section about adding XP machines to a domain.

http://hr.uoregon.edu/davidrl/samba/...tml#JOINDOMAIN

If u dont make those changes in registry, u will be able to add your pc to the domain (control panels - system - network identification - set to domain and so) but users wont be able to log into domain after reboot.

Is this your problem or u cant add PC to domain (from control panels - system....)?
 
Old 09-18-2003, 06:55 AM   #14
deflin
LQ Newbie
 
Registered: May 2003
Posts: 6

Rep: Reputation: 0
Windows XP clients need SRV records in their DNS when they attempt to be connected to a windows 2k server.
I don't know if this is the same for clients connecting to Samba or if there is a work-around.
 
Old 09-18-2003, 04:06 PM   #15
bLaDe
Member
 
Registered: May 2003
Location: Adelaide, Australia
Distribution: Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
All registry changes on the XP machines have been done, none of them had any failures it was only the linux box so they are all still intact with no changes.

I followed the instructions from the IBM developerworks link which someone popped up earlier which had it working before the hard drive died.

Update: I have just verified all the settings in 'Local Security' and the 'Registry' have been changed, all looks good from where I am sitting.

Update 2: I am not sure whether this is related but I am unable to ping 192.168.1.1 (linux box) or the hostname of that machine (Holden).

In windows I get Request timed out and in linux it just sits there trying to do something.

If I sit infront of the linux box and ping murphy or kelly it does it quite happily.

I have a feeling this is somehow related to my problem but I am unsure how to go about fixing it.

**Update 3: ** Disregard what I have written in this post above here, everything is almost normal now.

One little problem I am encountering though, when I login to the domain I appear to be only a normal user instead of like a power user or administrator which means I am unable to use a few applications which has chucked a spanner in the works. Although this could have it's benefits on my other machines I like to have a bit of control over my own pc.

Does anyone know how I can go about fixing this tiny problem up? I gather I have to add myself ie the user name I login to windows into the admin group or something similar?

Not sure but all this square eye look on my face looks as though it may have finally paid off

Last edited by bLaDe; 09-19-2003 at 05:39 AM.
 
  


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 PDC JamieKenyon Linux - Networking 1 06-28-2003 11:38 AM
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 05:33 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