Quote:
Originally Posted by veeruk101
It seems like 'root' on the server and 'root' on the laptop are being treated the same here, which is confusing to me because I figured they would be different accounts because they're on different machines. If I change the file ownership on the server to a user whose uid doesn't exist on my laptop, doing 'ls -la' on the mounted samba share shows the ownership of that file to be a uid not a name, for example '501' or '502'. What happens in such a case where you mount a samba share with user ids that don't exist on the mounting system, I don't know much about this stuff but I would have assumed it would complain or not let you mount it!
|
You are right, those two are different accounts. But remember that root always gets UID 0 no matter which system you work on, your client will always show root as owner.
Samba will only tell the client the UID and GID of a file on the share. The client will then look in his own /etc/passwd if it can map those values to a user name, if it can not it will just show the UID/GID it got from samba.
The mounting is done through the user/password you supply in the mount command. As long as they are valid the mount should succeed.
You could also take a look at
man mount.cifs for more information on the options for mounting.
I also would advice to use a credentials file for the user and password.
For example, this is my fstab entry to mount my music colection.
Code:
//sirius/music /home/gerrard/Music cifs cred=/etc/cred.gdj 0 0
A good place to learn more about samba is
samba.org, especially the
using samba documentation.