Page 1 of 1

2 questions for you (1 samba related, 1 mount related)

Posted: Sun Dec 03, 2006 12:57 pm
by gordonmarkus
Hi everyone,

I've just got a KVM switch in my home office which is great because it means that I can use my centos box most of the time now without having to either VNC to it, or move the cables across from the XP machine. Also, I've just put in a 200Gb drive along with the 40 that was in there already I should be setup for a while. Anyway - there's a couple of small problems that I just can't seem to get around, and I'm hoping that you guys can help:

1. I want to use the centos box as a print server for all of other pc's that are on the network. I've got the printer running ok on the centos box, and test pages work ok. Sharing is turned on, and I've got the following in my smb.conf file - but when we try to connect to it from a windows box, we get a 'printer not available' type message:

# Global Parameters

workgroup = WORKGROUP
netbios name = Home-Server
printcap name = /etc/printcap
load printers = yes
printing = cups
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes

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

ok - so now onto question 2, that might be a bit easier

The new drive is in, and I've created the filesystem and mounted it to '/disc2'

I've created a subdir - /disc2/gordon/

and I want to get this mounted to my home directory - can I do this?

Thanks in advance for your help.

-Gordon.

Posted: Sun Dec 03, 2006 6:18 pm
by snarkout
What does "I want to get this mounted to my home directory" mean? You want /home/gordonmarkus to be the 200 gig disk? You want /home to be the 200 gig disk? You just want a 200 gig "filder" in your home directory? Any of these are doable, but you'll need to be more specific.

Posted: Mon Dec 04, 2006 8:16 am
by gordonmarkus
Hi there,

Thanks for the reply, and apologies for my vagueness relating to the mounting query.

What I'm trying to achieve is to have a subfolder of my home directory mounted to a folder on the new 200Gb drive.

I hope this makes sense.

Thanks,

-Gordon

Posted: Mon Dec 04, 2006 8:36 am
by snarkout
Probably the easiest thing to do in this case since you already have the new drive mounted as /disc2 is link to the subdirectory you have made on it.

ln -s /disc2/gordon /home/gordonmarkus/name_you_want_to_use

That's what I'd do, at least. If that's not what you're looking for, you could also mount the entire drive somewhere inside your home directory (there's no rule saying you have to mount things on /) or you could partition the disk and mount a single partition under your home directory.

Posted: Mon Dec 04, 2006 10:59 am
by gordonmarkus
Hi,

Thanks for that.

I've not used the ln command before - I'll look it up when I get home. Will that 'remount' if I reboot the box, or will it have to be done manually each time?

Thanks again for your help.

Regards,

-Gordon

Posted: Mon Dec 04, 2006 11:14 am
by snarkout
No - you're going to have to add a line to /etc/fstab to remout the drive every boot. The link will jut make the drive, or the portion of the drive you're planning to use, appear like a folder in your home directory. What is the device node (/dev/whatever) your drive is showing up as? If you're not sure, just run "mount" with no switches.

Posted: Mon Dec 04, 2006 3:01 pm
by Vogateer
Man, ln is one of those simple, useful utilities. I'm so thankful I've run gentoo, it really gave me some good experience with those type of utilities. I have to use it to link /usr/src/linux to the current kernel directory every time I update my kernel. I really should use Linux From Scratch just once so I can learn a few more of these things.

Posted: Wed Dec 06, 2006 3:35 pm
by gordonmarkus
I've just got the chance to use that command, and it works a treat.

Thanks!

Interestingly, there is no mention of this command in my RedHat ES4 bible, and I find that a bit suprising as it's such a handy tool.

My 'teach yourself linux in 10 minutes' book that I bought for a couple of quid from ebay does have it though - I know where to look first in the future!!

-Gordon : :)