Mount Windows Share on RHEL4
Hey all,
I know this is a bad subject for a linux forum, but im looking to mount a windows folder from my LAN onto my Linux machine. I have set to share a folder on my Windows Box. And I ran "findsmb" on my enterprise 4 machine. It found nothing. Basically im just looking to share certain folders FROM windows TO linux. THanks so much! |
That's because RHEL does not support for some of the older smb utils any more, one as to install rpm packages built from the samba.org source for in order to use the findsmb utility. You should use the IP address of the Windows shares for mounting, you can get this information from the Windows system(s) by typing: ipconfig /all
Remember to use cifs instead of smbfs when mounting also; Example: Code:
mount -t cifs //192.168.1.10/D /mnt/Desktop -o credentials=/etc/cifs.txt -rw |
Hey,
I have the 2.6.9-42 kernel. Do i still need CIFS? I have not heard much about it, and google doesn't seem to know that much either. DO i need to open firewall rules on the windows box? when i ran the mount command, it asked for a password. I tried all my passwords, as the remote user and as the admin user. Neither worked. Thanks for the help |
You've got RHEL4 so thats so nice.
As Lenard said you'll need CIFS. so for example you have a share on windows called test and you use easy filesharing. The ip of the windows system is 192.168.1.1 then you can do this on your linux rhel4 in order to mount it. Quote:
Quote:
Quote:
|
WOW, FANTASTIC
I had to do the following: Code:
mount -t cifs //IP/share /mnt/point -o username=user However it asked for the password the username, which is fine now. However how can i automake this in /etc/fstab and make it so I dont need the password?? Thanks so much |
For those interested i found the solution to mount in /etc/fstab.
Add password file (anywhere really). I add in /etc/samba/smbpasswd (even though samba has nothing to do with cifs. Code:
username=user Code:
$mount -t cifs //domain/share /mount/point -o credentials=/etc/samba/smbpasswd |
And the entry in the /etc/fstab file follows like the examples given already;
//domain/share /mount/point cifs rw,credentials=/etc/samba/smbpasswd 0 0 |
Quote:
domain... ? better use the host name instead and if dns or the host file isn't setup correct use the IP. BTW - Don't put the credentials file in a home dir cause it isn't accessible at this time when the fstab is issued. |
and what happens if the share is unavable during the linux machine reboot? if the line is added in the fstab? the linux machine will halt boot correct?
somewhere, not sure where. I read a way to set it up where the shared drive is only mounted on demand. or somthing like that. for example if you have a linux machine that does a backup at 12 midnight and uses kbackup to do it, when it starts the backup it issues the mount then unmount when done. am I off base?? sounds nice, but cant find where I read that. my only concern is the fact that if the share is an external Hard drive on the windows network and the drive isnt attached or its turned off, and fstab dont see it during boot then it would be a pain to get the linux machine to boot. correct? |
Quote:
why you can mount remote share in /etc/fstab --> it because you already have access from SAMBA : mount -t cifs remember? cheers :) |
Errr..........credentials=/etc/samba/smbpasswd is simply a path (/etc/samba) to a file named (in this case) smbpasswd which reads like;
username=fred password=mypassword |
ok i got the share to mount with this
mount -t cifs //192.168.1.10/maxtor /mnt/winshare but like what was stated before i need to hit enter because it asks for a pass, there is not pass so i hit enter and it mounts. (great) but i want to use fwbackup to run at 2am and i want to set it to mount the drive before it starts backing up and unmount when it is finished, when i tryed the code below and after i made the smbpasswd file it gives me a ton of option that i am not sure of...also i nothed that when i use umount -t cifs //192.168.1.10/maxtor /mnt/winshare to unmount the share ...it wont unmount i can still see it in the /mnt/winshare Quote:
|
Errr.....no! it is not: umount -t cifs //192.168.1.10/maxtor /mnt/winshare
The proper command is something like: umount /mnt/winshare |
All times are GMT -5. The time now is 10:49 PM. |