-   Linux - Newbie (
-   -   Help setting up Samba? (

snakeo2 03-23-2004 11:51 PM

Help setting up Samba?
I need help with samba , new to linux trying to learn how to get around.
I have two hard drives, on drive A i have xp pro , on drive B i have redhat 9.0. basically, i want to be able to access my files on xp while using redhat and viceversa. I have samba installed already. I need detailed instructions as am new to linux and still dont know most of the lingo or commands.

also having problems setting up dsl connection. i have been trying for days now, have read several threads, but no success so far.
i have tried these commands
/sbin/ifup eth0
i get this message: user cant control this device
i get : permission denied
/sbin/ifconfig eth0 up
i get: permission denied
i get: bash:/etc/sysconfig/network-scripts/ifcfg-eth0-permission denied
i get: bash:/etc/sysconfig/network-permission denied
i get: bash permission denied

after playing around , i went to system setting -network confirguration-and i was able to activate eth0. i then tried to go on line , but when i try to go to any website, i go the message" location not found" any help regarding these to problems will be appreciated

shubb 03-24-2004 03:19 AM

From what you are saying, it sounds like both these drives are in the same computer? If so, then you dont need Samba. Samba is for connecting to a different windows PC. What you need to do is mount the windows drive to a mount point on Linux.

First, you need to verify what file system XP is installed as, Fat32 or NTFS. I think that XP uses NTFS. I believe that currently, linux only supports read-only for NTFS, so you wont be able to write to the XP drive.

Try using this:

Create a directory that you want to mount the XP drive to.

mkdir /mnt/xp

Then mount the drive to the mount point.

mount -t ntfs /dev/hda1 /mnt/xp <-- replace the hda1 with the drive/partition that XP is on.

If the command executes successfully, you should be able to read the XP drive from the /mnt/xp directory. If not, post back any errors you get.

For the Internet problem, can you ping anything on the internet by IP address or by hostname? If you can ping by IP, but not by hostname, then you probably just need to add a DNS server to /etc/resolv.conf

send the output of the following:

cat /etc/resolv.conf

If the resolv.conf does not have anything, then add the following to the file using your ISPs DNS server for x.x.x.x

nameserver x.x.x.x

iluvatar 03-24-2004 03:28 AM

for accessing files: samba can be used to access windows shares, so windows must be running and sharing some stuff, wich isn't the case because linux is running :) however, you can mount your windows partition in linux. create a dir where to mount your windows partition (say 'mkdir /mnt/winxp') and mount it with 'mount /dev/hdxx /mnt/winxp' where 'hdxx' is the device of your windows partition (like hda1 or hdb2) wherever it is. if you don't know wich is your windows partition, run cfdisk to check it, DON'T change anything!! NTFS filesystems are mounted read-only, write support is DANGEROUS! reading works perfect :) as for a DSL connection, I don't have any experience with that, but you can take a look here: The Linux DSL Howto, have fun!

scheidel21 03-24-2004 04:21 AM

Well pretty much everyone has all ready told you about the mounting an windows partition from another hardrive in the same PC. THere are some third party utilities and project which provide write support for NTFS I am not sure how relaible they are I have not tried them yet. You can search for Linux NTFS support.

As for the DSL it may be a lack of DNS servers listed, however. most DSL providers use PPPoE make sure you have PPP support in your kernel or as a module, then find a PPPoE program that should solve your problem.


sentinela 03-24-2004 05:44 AM
check that site.. there is everything u need to mount ur winxp ntfs partition pretty good explained.

snakeo2 03-24-2004 07:13 AM

thanks , i will try all the above mentioned commands

LinuxBlackBox 03-24-2004 07:59 AM

When you are issuing these codes to get the network working, do you know which user you are doing it as? You should do it as root, root has the ability to run/change any program on the machine. Your user account cant do that
su root
and enter your password

then try all of those things again

snakeo2 03-24-2004 08:05 AM

i tried mkdir/mnt/winxp
i get: bash no such file or directory
i tried mnt/dev/hde1/mnt/winxp
i get: bash no such file or directory
i also tried cfdisk
i get: command not found
I was trying under a username, i will switch to root and see it that makes a difference

scheidel21 03-24-2004 09:07 AM

YOu actually have to edit your /etc/fstab file it contains your Filesystem information, you need to add an entry that contains the partition that your XP drive is on and you have to list the Filesystem type, it will either be vfat (Fat32) or NTFS once it is in your fstab you create a directory in the root folder of your drive (/) by typing mkdir xp it will create an empty folder. THen after you have created the directory type the mount command.


shubb 03-24-2004 11:23 AM

snakeo2, the error about file not found when you try to create the /mnt/winxp means that you dont have the /mnt directory. Use the -p option when creating the /mnt/winxp to automatically make all parent directories.

snakeo2 03-24-2004 02:13 PM

hey shubb, thanks for the tip
im a newbie, can you tell me the exact command so i can try to see if it works

sentinela 03-24-2004 02:29 PM

what i see is that u are typing wrong....
it goes
mkdir /thedir/dir and not mkdir/thedir/dir
mount /dev/hdax /mnt/whateverdirforxp (x=where ur ntfs is)

im new to linux 2 but maybe is that ur mistake..

shubb 03-24-2004 04:56 PM

First, check to see if you have the /mnt directory

ls -al /mnt

If it says no such file or directory, then you need to create it.

Create the directory, and the mount directory for xp

mkdir -p /mnt/winxp

Now you should see the mnt directory from /, and you should also see the winxp directory in the mnt directory

Also remember, that when you are creating directories from /, you need to be root.

snakeo2 03-24-2004 09:13 PM

finally, as someone pointed out, i was typing the wrong code. after typing mkdir /mnt/xp, i did not get any errors, i then typed mount -p ntfs/dev/hde1/mnt/xp, did not get any errors either, so i guess it created the directory. i went to check / as root and there is a directory called xp, however there is nothing in it? is there something that im missing? if someone knows what im doing wrong, please let me know.. as far as the internet connection goes, i think im getting close, eth0 is now active. when i type in the url bar, i get a prompt window asking me to input the username and password of the DI-624 router? i dont know what to do next? i tried putting the username and password assigned by ISP, but that didnt work. anyone has any suggestions.....

ludeKing 03-24-2004 10:31 PM

You are missing the spaces in your commands!

first up, type this in a console:
"dmesg | grep hd" (note the | is shift and backslash on my keyboard - called a pipe) and see if your xp hard drive is detected, if it says hdd or hda or whatever, that is great! Now, how many partitions on your XP drive? One? great!

Now if the dmesg command returned hdd: FUJITSU blahblah etc then your xp drive is called hdd and if you only have one partition its hdd1. If it said hda: fujitsu blahblah etc, then your Xp drive is called hda.

as root:

mkdir /mnt/xp (note the space between mkdir and the first /)
then the mount command: mount -t ntfs /dev/hdxx /mnt/xp (note ALL the spaces, and hdxx is what came from the above paragraph)

See how you go.

All times are GMT -5. The time now is 08:40 PM.