# samba & fileserver mount

## sk8harddiefast

i am trying with samba but no luck  

i create a user for samba. 

mount -t cifs //my server ip/mnt/500GB /mnt/nas/500GB/ -o user=ember,password=freenas,rw 

mount error 5 = Input/output error

Refer to the mount.cifs( :Cool:  manual page (e.g.man mount.cifs)

i cannot mount my hdd  :Sad: 

----------

## pgf

 *sk8harddiefast wrote:*   

> mount -t cifs //my server ip/mnt/500GB /mnt/nas/500GB/ -o user=ember,password=freenas,rw 

 

Try:

```
mount -t cifs //my server ip/mnt/500GB /mnt/nas/500GB/ -o "user=ember,password=freenas,rw"

```

Note the double quotes around the options.

----------

## sk8harddiefast

i try it but i took the same answer  :Sad: 

----------

## pgf

 *sk8harddiefast wrote:*   

> i try it but i took the same answer 

 

And are you able to connect to your samba server by other means - ssh, for example? What do the samba logs say on the server?

----------

## sk8harddiefast

yes.i can connect.the problem seems to be on user that i created.on username or password.but i try everything!!!!!!admins,root,guests,anything!!!!!!!!!!more than 20 combinations!!!!!!!

also i tried with .smbcredentials.

```
mount -t cifs //169.254.23.15/mnt/500GB /mnt/nas/500GB/ -o credentials=/root/.smbcredentials,uid=ember,file_mode=0755,dir_mode=0755
```

where .smbcredentials is a file with username ember & password freenas

----------

## pgf

Okay. Let's take a few steps back and go over everything from the start. I am not sure if some of my assumptions are correct. First off, what is the server: Linux/Samba, Windows, a storage appliance, something else?

Next, how did you create the user "ember"? If using a samba server you would need to have done a "smbpasswd -a ember" to add the user to the /etc/samba/smbpasswd file on the server. 

Also, from the client machine, what happens when you do:

```
smbclient -L //169.254.23.15 -U ember

Password: freenas

```

Post the output from this, please.

----------

## sk8harddiefast

my fileserver have freenas.my desktop pc have gentoo  :Smile: 

i want to mount my disks from freenas to my desktop pc.

the mountpoint of hdd on freenas is /mnt/500GB

the mountpoint of hdd on my desktop pc is /mnt/nas/500GB (there i want to mount hdd of freenas)

also 

smbclient -L //169.254.23.15 -U ember 

Password: freenas 

i take this message:Unknown parameter encountered: "encrypt pass"

Ignoring unknown parameter "encrypt pass"

Password: 

session setup failed: NT_STATUS_NO_LOGON_SERVERS

but

smbclient -L //169.254.23.15 -U admin

Password:(nothing on password.just press enter)

i can get in!!!!

```
Anonymous login successful

Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.0.37]

        Sharename       Type      Comment

           ---------          ----          -------

            1.5TB            Disk         1.5TB

            500GB           Disk         500GB

             IPC$            IPC          IPC Service (FreeNAS Server)

Anonymous login successful

Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.0.37]

        Server               Comment

        ---------               -------

        FREENAS              FreeNAS Server

        Workgroup            Master

         ---------                 -------

        LOCALHOST            FREENAS

        NAS                       GENTOOBOX
```

for the end i create a user reading this: http://samba.netfirms.com/addusers.htm

----------

## pgf

 *sk8harddiefast wrote:*   

> smbclient -L //169.254.23.15 -U ember 
> 
> Password: freenas 
> 
> i take this message:Unknown parameter encountered: "encrypt pass"
> ...

 

Okay - I think we are getting to the root of the problem. I am not familiar with freenas but appears to be samba on a BSD kernel. I see that the document you reference uses smbpasswd. Just to be sure, let's create a whole new user and test with it. Create a new user called "test" and give it a password "testing":

```
useradd -s /bin/false test

smbpasswd -a test

New SMB Password: testing

Retype new SMB password: testing
```

This of course is done on the freenas system. Try the smbclient command again with this new userid:

```
smbclient -L //169.254.23.15 -U test

Password: testing 
```

The other problem I can see with your mount command is the the share name is //169.254.23.15/500GB, not //169.254.23.15/mnt/500GB. If you are able to connect using the new userid, then try to mount your share:

```
mount -t cifs //169.254.23.15/500GB /mnt/nas/500GB/ -o "username=test,password=testing"
```

Note the change to the share name - I have removed the "/mnt" part.[/code]Last edited by pgf on Mon Dec 07, 2009 1:47 am; edited 1 time in total

----------

## pgf

Almost forgot: just to be sure, restart the smb service: /etc/rc.d/init.d/smb restart

----------

