Click to See Complete Forum and Search --> : samba mounting?


jerbear
08-05-2003, 04:56 PM
Hey all,
I'm somewhat of a newbie when it comes to linux - I really haven't even looked at it in a few years. However, I have a brand new Dell RedHat 8 box sitting on my desk at work now. I have samba working now. I noticed someone mentioned having trouble with getting swat working. I had to edit the file /etc/xinetd.d/swat. Mine currently has:
# default: on
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

Originally the last line had "disable = yes"

Anyway, my question is: Has anyone tried mounting windows shares through the fstab file? I would rather not have to have the password sitting in a plain text file for obvious reasons. However, I am using the same username and password for the windows and linux boxes. If the fstab route wouldn't work, how about a script that runs on log on? Prompting for passwords at that point would be acceptable. I just have no idea how to do that. My scripting experience in linux is essentially zero!

Thanks,
JB

Hayl
08-05-2003, 05:04 PM
this has been covered many times already and you could probably have found another thread with this answer however, i'm in a good mood and don't mind typing, so here goes.

/etc/fstab//server/share /mnt/mountpoint smbfs credentials=/home/username/.smbpassword,uid=username 0 0
then create ~/.smbpaswword with 2 lines in it and make it readable only by your account (i.e. chmod 700 .smbpassword)username=your_samba_username
password=your_samba_password

cowanrl
08-05-2003, 08:43 PM
If you click on the little Library button at the top of this page, then select File Systems, there are 2 articles there that will tell you how to accomplish what you want to do, Mounting smbfs Shares Permanently and Connecting to SMB Shares from Linux

jerbear
08-06-2003, 01:35 PM
Aha, thanks, my bad! I had looked under the networking section in the newbie help files, and I had done some google searching. Just missed the two other places that had the answers! Thanks a bunch.

JB