# [SOLVED] Samba works neither in GVFS nor in CUPS

## v6ak

Both of smbclient and mount.cifs work correctly. However, GVFS and CUPS don't.

I've compiled everything with "samba" global use flag ('emerge -av --update --deep --newuse world' updates nothing):

```
ntb ~ # cat /var/db/pkg/gnome-base/gnome-vfs-2.24.4-r1/USE 

acl amd64 elibc_glibc ipv6 kerberos kernel_linux multilib samba ssl userland_GNU

ntb ~ # cat /var/db/pkg/gnome-base/gvfs-1.6.7/USE 

amd64 archive bash-completion elibc_glibc fuse http kernel_linux multilib samba udev userland_GNU
```

Whatever I try to mount by GVFS (althoung it can be mounted by mount.cifs) fails: // EDIT: GVFS works, see below

```
$ gvfs-mount smb://user@server/directory

Error mounting location: volume doesn't implement mount
```

There is also a worse problem: CUPS via samba does not work. I'm not sure whether these two problems are related, but they can be. Any attempt to print anything ends in NT_STATUS_LOGON_FAILURE, although I use the same credentials I use with mount.cifs. (Mistyped passwords are really improbable, because I've tried it many times.)

/var/log/cups/error_log says the following:

```
E [08/Aug/2011:18:30:08 +0200] [Job 5] Session setup failed: NT_STATUS_LOGON_FAILURE

E [08/Aug/2011:18:30:08 +0200] [Job 5] Session setup failed: NT_STATUS_LOGON_FAILURE

E [08/Aug/2011:18:30:08 +0200] [Job 5] Session setup failed: NT_STATUS_LOGON_FAILURE

E [08/Aug/2011:18:30:08 +0200] [Job 5] Tree connect failed (NT_STATUS_ACCESS_DENIED)

D [08/Aug/2011:18:30:09 +0200] [Job 5] The following messages were recorded from 18:30:09 to 18:30:09
```

(and many uninteresting lines)

I've no idea where the problem is. Do you have any?Last edited by v6ak on Thu Aug 18, 2011 5:51 pm; edited 2 times in total

----------

## redagadir

is winbind up?Last edited by redagadir on Wed Dec 21, 2011 9:08 am; edited 1 time in total

----------

## v6ak

Winbind? It resolves names to IP (Microsoft's DNS alternative), isn't it?

It is not neccesary when I access it via IP, is it?

----------

## v6ak

I've found the source of GVFS-related problems: It was a bad .xinitrc. There is the bad line:

```
exec ck-launch-session openbox-session
```

The correct replacement is:

```
exec dbus-launch --exit-with-session --sh-syntax openbox-session
```

However, the Samba printer problem still remains, so it does not seem to be a related problem  :Sad: 

----------

## Dagger

Which version of samba and cups are you using?

Please post your samba configuration.

I'm using samba 3.6.0 with cups 1.4.8 and ADS authentication and everything works perfectly fine.

----------

## v6ak

Finally, I've solved SMB CUPS. There are changes I've made:

* updated workgroup in smb.conf.

* using hostname (which is defined in hosts and is a "Windows computer name") instead of IP address in the printer location

----------

