LinuxQuestions.org
Help answer threads with 0 replies.
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 05-17-2004, 05:41 PM   #16
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361

You will need Samba for this, setup as a PDC.

It is a pretty simple configuration actually.

You are going to have users login to the Samba machine as a PDC, and have the home directories setup as shares on the server. You will also have a simple logon script that runs the "net use" command to mount the shared directory as U:.

The Samba website is the best source of documentation for this. I wouldn't suggest buying a whole book for this one project, but that is up to you.
 
Old 05-17-2004, 05:54 PM   #17
webwiznz
LQ Newbie
 
Registered: May 2004
Location: Auckland, NZ
Distribution: Debian Etch
Posts: 19

Rep: Reputation: 0
I read recently how to do this. The samba config sets all users to have an automatic share, and the login script which is provided by samba ,when run on the xp box maps the drive.

Now, where did i read this. It was one of two places:
Sams teach yourself Samba in 24 hours / Gerald Carter with Richard Sharpe
or
Using Samba, 2nd Edition By Jay Ts, Robert Eckstein, and David Collier-Brown

the latter of which is available in full text on line.

P.
 
Old 05-17-2004, 05:59 PM   #18
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
This smb.conf should get you pretty close to what you want, though you will still need to create the logon batch file.

Code:
[global] 
workgroup = Workgroup_Name
server string = Samba PDC
hosts allow = 192.168.1., 127.

# Put a capping on the size of the log files (in Kb).
max log size = 50 

# Security mode
security = user 

unix password sync = yes
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 *Please*retype*new*password* %n\n *password*successfully*updated* 

local master = yes 
os level = 64 
domain master = yes 
preferred master = yes 

logon home = \\%L\%U
logon drive = U:
logon script = netlogon.bat 

#=== shares ===
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775 

[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
writable = no
share modes = no
That should work. I did that pretty much off the top of my head, and haven't tested it. But debugging is half the fun.

You will need to add the Windows users using the command:

smbpasswd -a username

Make sure that the Windows and Unix passwords match, and of course make sure there is a matching Linux user for every Windows user.

The batch file "/home/samba/netlogon/netlogon.bat", should contain something like:

net use U: \\ServerName\%username%

That should mount the currently logged on Windows users home directory as U:.

Unless I have missed something, that should work.
 
Old 05-17-2004, 06:00 PM   #19
webwiznz
LQ Newbie
 
Registered: May 2004
Location: Auckland, NZ
Distribution: Debian Etch
Posts: 19

Rep: Reputation: 0
Sorry I lied. The former is also available on line. Man what more can a mortal guy or gal really want in this life?. Free books!

eg see chapter 10 preexec scripts
http://freebooks.by.ru/view/SambaIn24h/ch10-01.htm

chapter 12 Case Study: Replacing an NT File and Print Server
http://freebooks.by.ru/view/SambaIn24h/ch12.htm
 
Old 05-17-2004, 08:16 PM   #20
citrus
Member
 
Registered: Dec 2003
Location: California
Distribution: Kubuntu 6.1
Posts: 548

Original Poster
Rep: Reputation: 30
MS3FGX
plz tell me that i don't have to set up every user on each xp box for this schimatic
 
Old 05-17-2004, 10:34 PM   #21
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
No

Well, other than the fact you have to add each Windows XP machine to the domain.
 
Old 05-18-2004, 12:15 AM   #22
citrus
Member
 
Registered: Dec 2003
Location: California
Distribution: Kubuntu 6.1
Posts: 548

Original Poster
Rep: Reputation: 30
so the first thing i should do is?

add users to my linux server?
edit my smb.conf?
??
 
Old 05-18-2004, 12:36 AM   #23
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Yes.

1. Add the user accounts in Linux
2. Edit the smb.conf (then restart Samba)
3. Run "smbpasswd -a username" for all the users you made in step 1
4. Add Windows XP machine to the domain you just created
5. Login to the Samba server from Windows XP
6. Hope for the best
 
Old 05-18-2004, 01:53 AM   #24
citrus
Member
 
Registered: Dec 2003
Location: California
Distribution: Kubuntu 6.1
Posts: 548

Original Poster
Rep: Reputation: 30
lol
thanks man
i will try it tommroow
 
Old 05-18-2004, 11:41 PM   #25
citrus
Member
 
Registered: Dec 2003
Location: California
Distribution: Kubuntu 6.1
Posts: 548

Original Poster
Rep: Reputation: 30
ok well i got all that set up

my linux server is named slackserver
but i don't know if this is my domain or not

when i try to change a winxp box to the domain slackserver

i get an error
" a domain controller for the domain slackserver could not be contacted "

slackserver is the netbios name of my server

what do i do?
 
Old 05-19-2004, 12:41 AM   #26
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Your domain is whatever you put in for "workgroup =", not the hostname of the server.

So on XP, put in the workgoup name you setup in Samba as the domain, and you should be able to join the domain.

Oh, and I didn't mention this before, but you need to do:

smbpasswd -a root

You need to do this because when you try and join the XP machine to the domain, it is going to ask you for a username and password for a user that is allowed to add machines to the domain, this would be the root acount.

If it still doesn't allow you on the domain, check your Samba logs. It may say something about there not being an account for the computer that tried to join the domain, in which case do:

useradd -g 100 -d /dev/null -s /bin/false machine_name$

"machine_name$" is the NetBIOS name of the Windows XP machine you are trying to put onto the domain.

Then do

passwd -l machine_name$

And finally:

smbpasswd -a -m machine_name

Fun, isn't it?
 
Old 05-19-2004, 01:36 AM   #27
citrus
Member
 
Registered: Dec 2003
Location: California
Distribution: Kubuntu 6.1
Posts: 548

Original Poster
Rep: Reputation: 30
hmm
ok

well i still get the same error
" a domain controller for the domain MSHOME could not be contacted "
then i thought maybe it had some problem with being the same workgroup so i changed it to domaintest
" a domain controller for the domain domaintest could not be contacted "

i did everything you said...

i check the samba log
after i rebooted the server
bing failed on port 139 socket_addr = 0.0.0.0.
Error - Adress allready in use

i don't know if this is relevent...


what should i check now???
 
Old 05-19-2004, 01:54 AM   #28
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Have you checked that you can ping this machine and connect to it with other services? And your NIC is working properly?

The "bing failed on port 139 socket_addr = 0.0.0.0." looks quite odd.
 
Old 05-19-2004, 01:59 AM   #29
citrus
Member
 
Registered: Dec 2003
Location: California
Distribution: Kubuntu 6.1
Posts: 548

Original Poster
Rep: Reputation: 30
yeah i can connect to it
yeah i can ping it
and i am running an mp3 server off of it
and i can get on that too
 
Old 05-19-2004, 02:23 AM   #30
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Alright, stop Samba, delete the 2 long files (smbd.log, nmbd.log) and then start Samba again.

After Samba starts, check the log files. See if they are starting properly. There shouldn't be any errors, it should say that it is starting, and give you some status messages.

The error you posted makes it seem like Samba isn't starting properly.
 
  


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
Why not use Astaro as a normal day to day desktop?? chutsu Linux - General 1 10-08-2005 11:42 PM
Back up tape drive urgent spilotro47 Linux - Hardware 17 06-06-2005 07:56 AM
need a tool to back up hard drive citrus General 10 05-04-2004 06:27 PM
Back Up Hard Drive? RTB Linux - General 3 04-13-2002 12:14 PM
Want my drive back...who's going to give it to me?? rdiggidy Linux - Software 1 04-07-2002 06:19 PM

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

All times are GMT -5. The time now is 10:58 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