Click to See Complete Forum and Search --> : W2k and Samba


hhilario
06-04-2003, 03:41 PM
I have a problem. I've been using rh8.0 for the last 10 days. Where I work has a w2k server and im accesing it through samba. The problem is the following (having my username and pwd created in both os): i can access the mounted drive but cannot write on it but the root (who doesnt have an account in w2k) can. Why is this discrimination happening? How can I solve it?

Hayl
06-04-2003, 04:01 PM
add user to your options in /etc/fstab for that mount point.

or uid=<your username> in /etc/fstab for that mount point.

tcarradine
06-04-2003, 10:12 PM
Originally posted by hhilario
I have a problem. I've been using rh8.0 for the last 10 days. Where I work has a w2k server and im accesing it through samba. The problem is the following (having my username and pwd created in both os): i can access the mounted drive but cannot write on it but the root (who doesnt have an account in w2k) can. Why is this discrimination happening? How can I solve it?


place the following at the bottom of /etc/fstab (you must be root to edit fstab)
-- also, do not forget to add an extra blank line at the end of fstab or you will get "no final new line" errors on boot when your fstab is processed.

//xxx.xxx.xxx.xxx/share /home/username/nettmp smbfs credentials=/home/username/.smbpasswd,uid=username 0

notes:

1) xxx.xxx.xxx.xxx should be the IP Address of the Windows machine your connecting too. many people use the Netbios name, but I've found it unreliable. Using just the IP address will connect you just as well (as long as the Windows machine's IP address doesn't change which, as a server, I am going to assume it doesn't)

2) "share" of course is just the name of the share on the Windows machine

3) again, of course: replace all username with your actual username

4) create a text file in your home directory called .smbpasswd with two lines in it:

username=username
password=password

5) create a directory in your home directory to mount the Windows share in (I use /nettmp)
--Make sure the directory is owned by your user account and not root account or you will have problems!


Keep in mind this is not the most secure method to connect to your server, but it at least hides your username/password from fstab (and therefore any one who has access to your machine)

hhilario
06-10-2003, 04:16 PM
Thank your very much!:cool: You've saved my day!