# mount using random user

## jonfr

For some strange reason, netmount is now using random user when I mount a samba share on my FreeBSD server. This is what I get when I use ls -l command.

```
drwxr-xr-x  5 1001 1001    0 júl  8 02:58 www

```

I have deleted the user in question in order to try and get rid of this error. It doesn't work. This should be root:root as user and group if everything was correct. I have not seen this error before and I am not sure how to fix it.

Here is the config line that I am using in fstab.

```
//192.168.1.2/www       /mnt/www         cifs           rw,users,passwd=*,username=nobody                       0 0

```

The username=nobody used to be "guest". Changing this did not work at all.

Thanks for the help.

----------

## Jaglover

root:root when making remote connection? This certainly is unsupported by common sense. Maybe it is also unsupported now by FreeBSD/CIFS. Why don't you fix your ownerships first.

----------

## jonfr

The ownership on the folder while unmounted is root:root. It changes once it is mounted. I do not know why that is. This is client side problem, not a FreeBSD server issue.

----------

## vaxbrat

Agree with Jaglover.  This is cifs telling you to watch out for security on network mounts.  The first gotcha is relying on guest/anonymous for your credentials.  One of the standard things done with hardening exercises is to make sure that guest and anonymous accounts are deleted or disabled.  If you are going to have a wide open share between systems on your network, create a username or re-use one like apache which you may already be using for web services.

If you want users to get access to a cifs share, you may want their credentials to be used instead.  Look into pam_mount if that makes sense.

----------

## jonfr

This is my local network, there is hardly anyone on it but me. I am not too bothered with setting up a network user set-up for my local network. If I need a user, I need at least connect to my local user.

----------

## vaxbrat

I just throw myself into the smbpasswd file for the home stuff

----------

