LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-11-2005, 12:01 PM   #1
Paulsuk
Member
 
Registered: Jan 2004
Distribution: LFS
Posts: 91

Rep: Reputation: 15
Advice on Samba setup (please!)


Hi,

I'm looking for some advice and, hopefully, some pointers for where to get some seriously simple tutorials!!!

I have a small(ish) home network consisting (currently) of 1 Linux Server running LFS5.1 (but I'm going to upgrade to LFS6.0 soon - on new hardware) and SAMBA3, 3 desktop workstations (the kids) running XP Pro and a Laptop (mine and their mother's), also running XP Pro. The Laptop connects via wireless and the desktops are cabled. Printers are connected to the server and are accessed via SAMBA and CUPS.

Ok, so far so good. Now, what I want to achieve is to have all of the personal stuff for the kids to be stored on the server (Everything that is normally under the "Documents and Settings" directory.) I'd like, if possible, to keep the user-list style login screen (rather than a prompt for username / password), although I could forgo that requirement if I had to! How do I set this up? I have the Official SAMBA3 How-To & Reference guide but I'm not that good with windoze networking. Currently it is set up as a stand-alone server, but I suspect I may need it to be a PDC. What I have done so far is to, from each of the workstations, log in as each user and then in to the server as the user telling it to remember the password etc. I have then changed the properties of My Documents and My Faves by hand.....

Now, this has obviously been a real pain and even then, not everything is stored centrally. I am going to be upgrading the desktop machines soon (not all at the same time!) and would rather not have to do all that again, so I was wondering if anyone can suggest a better way to do this?

I'm also wanting to set uip SQUID on the server and will be looking for some filtering system (I've heard good things about Dan's Guardian). Ideally, I'd like not to have to re-authenticate to SQUID but have the whole system just detect who is logged in, if possible!

TIA

Paul
 
Old 03-11-2005, 12:44 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
This is for gentoo but gives you the idea,could I sell you on gentoo for your new server?
http://www.gentoo.org/doc/en/quick-samba-howto.xml
and
http://gentoo-wiki.com/HOWTO_Adding_...ting_AD_Domain

Last edited by comprookie2000; 03-11-2005 at 12:49 PM.
 
Old 03-11-2005, 01:12 PM   #3
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
I must firstly support comprookie2000's call for a move to gentoo. Best thing I ever did. Now, back to samba.

I use a linux server in pretty much the same fashion you intend using yours, only, I use it as a backup server for both XP and other Linux machines. My /etc/samba/smb.conf contains the following type of shares:

Code:
[XPBox]
        comment = Backup for XPBox
        path = /usr/backup/XPBox
        writeable = yes
        guest ok = yes
where /usr/backup/XPBox is a folder on the server with rights for the samba user. You might want to start with minimum security by setting security=share in your /etc/samba/smb.conf file just to get it away and then increase your levels of security as you go along. Remember to also set the workgroup=YourHomeWorkgroupName in smb.conf. I have had problems with XP when this was not the same as that set up on XP.

This should allow you see the share on your XP machine which you could then map to some drive to give you easy acces to it.

It should not be difficult.

Keep us posted.

regards
p.n
 
Old 03-11-2005, 03:21 PM   #4
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
I do this with all of our locations weither its using linux or not. All you need is a network share that can be maped. Then assign a drive letter to it by maping it. Then right click on your my docs icon and where the location is change it to T:\myownserver\mydrive\ or what ever. Then when ever they store things in there its backed up. This whole setup works better with XP then 98. On win98 if you do not sign on with the correct password then the whole connection goes down and that kinda sucks.

Another way is to have the nix server log on to the windows box and have it rsync the dir.
I use this service on my laptops as if its on the server its not on my box when I am not at home. On my home network I find it easyer to do it this way.

Then if you wanted to get real tricky you could write a script for windows that run when started that causes your rsyce to startup and do a backup. Then you could have the same thing done when you turn it off.

The last part of this post I have never tried. Just in theory so someone can correct me if needed.
 
Old 03-12-2005, 08:17 AM   #5
Paulsuk
Member
 
Registered: Jan 2004
Distribution: LFS
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks, folks for your suggestions!

Beginning with the Gentoo move - I'll take a rain-check on that one, if I may! I like LFS and am fairly sure that the underlying distro won't make much difference to what I'm trying to do.

The next suggestions are pretty much what I do already, there are 2 problems with this though:[list=1][*]It takes a bit of setting up and is dead tedious. The kids trash the machines regularly and I have to re-install them, so setting up all the re-mappings of My Docs etc is a real pain.[*]This only puts the docs on the server. I want the whole user profile there![/list=1]
I *Think* what I'm after is roaming profiles, but I'm sure where I used to work they re-configured Windoze to put the "Documents and Settings" directory on the server.....

Paul
 
Old 03-14-2005, 07:52 AM   #6
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Yep, thats what you are looking for, but its a real PIA to run a Active Directory. You may want to look into SAMBA TNG as it works better as a Primary Active Directory. Oh get ready to use a LDAP data base so there is 2 machines you just added to your network to make this work. The Primary directory sever has to be a powerful machine.

http://www.samba-tng.org/
http://www.tldp.org/HOWTO/LDAP-HOWTO/
 
Old 03-14-2005, 10:48 AM   #7
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Paulsuk: Maybe I missed something here, but mapping a remote drive as described by phatboyz and then using the xcopy command in a DOS batch file is an easy and low cost way to back up a windows system. Since you will be backing up the batch file with everything else, recovery from a windows failure is fairly simple. Alternatively, you can use an automated windows backup program from a company like Symantec. I actively use both of these approaches for backups to servers.

The only trouble I have been having lately with mapping drives to Samba servers is that I have to use the server IP address, instead of its netbios name to set up the path. In XP, you usually only need to log into the Samba server once and XP remembers the password “forever”.

As for the DOS batch command, let’s go back to the 1980's and use a command something like:

xcopy c:\docume~1\username\mydocu~1\*.* z:\backup\MyDocuments\ /c/h/e/k/r/m

where z: is the windows-mapped drive on the server. This is a recursive archival backup, so you only need to set up one line in the batch file for each location you want to backup. Then make a shortcut link on the desktop to this batch file and run it like any other program or stick it in the scheduler to run every day/week/whatever.

You have to manually figure out the 8-letter DOS folder names from the command prompt, which you only need to do one time. To figure out the DOS~X (DOS “tilde” X) names for directories with more than 8 letters, run "cmd" and manually work your way down the folder structure using the “cd” command, starting from at C:\ (or D:\, etc.). When the folder name has more than 8 letters, truncate it to 6 letters and try adding ~1, ~2, ~3, etc. at the end until you find the one that allows you to change the directory. For example, “/Documents and Settings” will usually truncate to “/docume~1".

For the first xcopy run, you either need to reset the archive bit of the top folder through windows (it will ask if you want to do subfolders = yes) or you will need to remove the “/m” when you run the batch file the first time to ensure that everything was copied.

A typical batch file (i.e. backup.bat) might look like this:

xcopy c:\docume~1\username\mydocu~1\*.* z:\backup\MyDocuments\ /c/h/e/k/r/m
xcopy c:\progra~1\paperp~1\data\*.* z:\backup\PaperPort\Data\ /c/h/e/k/r/m
xcopy d:\mp3\*.* z:\backup\mp3\ /c/h/e/k/r/m

Again, let me stress how easy this is to do.
 
Old 03-14-2005, 12:38 PM   #8
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
I think that I am going to take your advice and print this post cause I like your idea. Goodone "whatshisname"
 
Old 03-14-2005, 02:27 PM   #9
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
I do the same with all my backups from Windows machine, only I would recommend you look at xxcopy instead of xcopy (you can get it at ). xcopy is the standard utility that ships with windows, xxcopy however, is hugely more powerfull than xcopy.

Enjoy.

p.n
 
Old 03-14-2005, 08:38 PM   #10
Paulsuk
Member
 
Registered: Jan 2004
Distribution: LFS
Posts: 91

Original Poster
Rep: Reputation: 15
Thank you for your suggestions, however this isn't what I am trying to do...

It isn't about backing up the Windows PCs as much as about hot desking and rapid re-configuration.....

I'm sure it must be possible to configure where Windoze puts it's "Documents and Settings" or where %USERPROFILE% points to. I simply want this to be on the network.....

Any ideas? I'm sure this is a common requirement where hotdesking is in operation.

Paul
 
Old 03-15-2005, 12:14 AM   #11
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Paulsuk: It sounds like you are trying to create a Roaming User Profile.

That requires creating an NT domain and using an NT domain controller, as opposed to the Workgroup structure that we commonly use in Samba. There are several web links for creating a Primary Domain Controller (PDC) using Samba with some discussion of Roaming User Profiles. Here is one for gentoo:

http://gentoo-wiki.com/HOWTO_Impleme...s_2000_clients

Hope that gets you on the path.
 
Old 03-15-2005, 12:22 AM   #12
Sando
LQ Newbie
 
Registered: Oct 2004
Posts: 21

Rep: Reputation: 15
Yes this is possible. Yes i do know what you want to try and do. Yes you will need Roaming Profiles. I have setup a Samba 3 PDC before, however, It was a while ago and so just having a look through the Samba Official HOWTO on http://www.samba.org/ should tell you about:

a) Samba as a Primary Domain Controller
b) Samba and Roaming Profiles.

HOWEVER, roaming profiles means that at the END of every windows session, even if your shutting down, rebooting or logging out, ALL changes to your Documents and Settings\<your name> WILL be copied to the server.

This can take a VERY long time on a 100BaseTX Network, especially if you just download a 3gig file which is then transfered to the server. Also, while transferring, this can lead to slow downs with other logged in users.

However, if you have 1000BaseTX Network, then it really should be fine, providing that you have a nice hdd (EIDE, IDE, SATA, SCISI) with a nice 8 or 16 MB cache for local SERVER file transfers to different locations on the disk which is AT LEAST 20gigs in size. Also, have nice network cables, not close to any sources of interferance such as microwave ovens, fluroescent lights, etc.

Just my fair share,

Cheers mate, good luck!,

-Sandomaphone (Dimensional Flux Studios - Development and FluxNET)
 
Old 03-15-2005, 04:30 AM   #13
Paulsuk
Member
 
Registered: Jan 2004
Distribution: LFS
Posts: 91

Original Poster
Rep: Reputation: 15
Thank you, once again, everyone who has had a look at this for me!

The bit I can't understand is why the system has to be configured to do any copying at all. It seems to me that regardless of whether I go for a DOS batch file using XCOPY etc. or Roaming Profiles, the underlying result is the same. Namely, everything gets copied from the server at login, used locally, then copied back at the end.

What I really want to do is simply have the data used directly on the server. I understand that this may seem to be a slower way of foing things, but it's a home network with an eventual maximum of 6 concurrent users. I'm putting in 1Gb Ethernet, so load shouldn't be an issue!

Maybe this isn't so much a SAMBA issue as a Windoze one. I'll have a dig on some M$ forums to see if anyone can shed a suggestion or two!

If I get anywhere, I'll post back. In the meantime, if anyone has any thoughts, feel free to post!

Thanks again.

Paul
 
Old 03-15-2005, 12:40 PM   #14
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
Mmmm. I do not think Windows would appreciate not having it's Docs & Settings on the local harddrive. You must keep in mind that even if you manage to achieve this with Windows, whenever you work with files, most of it will sit in your local machine's memory or cache anyway, so either way, you will always be copying things back and accross from you server and you might not be saving much bandwith/processing time by having the only copy residing on the server as opposed to having a local Docs & Settings that is sync'd with the one on the server.

Anyway, just some thoughts. Let us know if you find a suitable solution.

Regards
p.n
 
Old 03-15-2005, 01:55 PM   #15
Paulsuk
Member
 
Registered: Jan 2004
Distribution: LFS
Posts: 91

Original Poster
Rep: Reputation: 15
This is very true, however the "copy everything" approach assumes that everything is needed. For a large profile, this is probably not the case, so only bringing over what's needed will be more efficient overall. It's a balance between a long login / logout time or a slightly degraded continual performance.

I'm currently looking at the following:-

My Documents on the server (a simple re-definition)
Something like RSync running in download mode on login and then upload mode using a scheduler. This should mean only changes get copied. What I do need to do is to see if I can arrange for a logout script to perform a final upload RSync.

This doesn't meet my need to centralise the management, nor does it keep a single copy of the user registry for each user, but you can't have everything!

Paul
 
  


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
Advice on RAID setup banhbao Linux - Hardware 5 03-04-2005 03:27 PM
Printer setup advice mike8994 Mandriva 1 04-15-2004 09:36 AM
Network Setup Advice jayptr Linux - Networking 3 03-16-2004 11:21 AM
I need advice on distro and setup. thelandrew Linux - Newbie 14 03-12-2004 03:54 AM
Advice on user setup please pembo13 Linux - Security 8 11-18-2003 08:29 PM

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

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