# smbmount, smbclient: Access denied

## Sivar

I am trying to get a Gentoo machine to access something..anything on a Windows 2000 machine and it absolutely refuses to let anything through.

I have a shared directory on the Windows machine which is now configured such that *everyone* has full access, and a printer setup the same way.

I have the same account setup on both the Windows machine and Gentoo machine with the same password and username, all lowercase.

I even enabled the guest account and made the user an administrator on the Windows machine.

This is what I have tried, both as root and as siva (not sivar), the user with Windows access:

```
mount -t smbfs -o username=siva,password=******** \\\\tony-w2000\\share /mnt/share/

6332: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

SMB connection failed
```

```
mount -t smbfs -o username=siva,password=******** //tony-w2000/share /mnt/share/

6336: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

SMB connection failed
```

```
mount -t smbfs -o username=siva //tony-w2000/share /mnt/share/

Password:********

6339: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

SMB connection failed
```

```
smbclient -L tony-w2000

added interface ip=24.116.159.104 bcast=24.116.159.255 nmask=255.255.248.0

added interface ip=10.0.0.101 bcast=10.0.0.255 nmask=255.255.255.0

Password: [I hit enter here]

Anonymous login successful

Domain=[WORKGROUP] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]

        Sharename      Type      Comment

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

Error returning browse list: NT_STATUS_ACCESS_DENIED

        Server               Comment

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

        CECELIA-LINUX        Samba Server 2.2.7a

        TONY-W2000

        Workgroup            Master

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

        WORKGROUP            TONY-W2000

```

I've also tried giving r/w/x access to everyone in /var/cache/samba/* for for /var/cache/samba itself.

I've tried every combination of sending the password and username in upper/lower case, I have encryption enabled, I have the correct entry in the Samba password file which matches the Linux and Windows password, and I have tried changing passwords on all systems several times.

The workgroup is "WORKGROUP"

I have a shared printer on the Windows machine as well, and get access denied messages from it. It, too, gives full access to the entire world.

Here's another interesting error:

```
smbclient -L tony-w2000

added interface ip=24.116.159.104 bcast=24.116.159.255 nmask=255.255.248.0

added interface ip=10.0.0.101 bcast=10.0.0.255 nmask=255.255.255.0

Password:********

session setup failed: NT_STATUS_LOGON_TYPE_NOT_GRANTED
```

Note that the Windows system can access Samba shares just fine.

Any help would be appreciated for all eternity.

----------

## tryn

 *Sivar wrote:*   

> 
> 
> Note that the Windows system can access Samba shares just fine.
> 
> Any help would be appreciated for all eternity.

 

  Can you ping Windows from the Gentoo computer, and the Gentoo computer from the Windows machine?

     You might try this.

    My system is different, windows 98 on one and gentoo on the other one. Samba installed on the Gentoo computer. Shares directory on the Gentoo computer. I couldn't mount the windows computer either I had to use this command  smb://WORKGROUP/C  In the location bar on a  Konqueror  window. Replace WORKGROUP name for the windows  computer name.

----------

## Fragile

Maybe it does not see the Username Passwd correct ( The Win2K Machine )

Enabling the Guest Account on the Win2K should do it for now, then I should still look

for the problem why it does not connect properly with the specified Username/Passwd

Also connect to Win2k with the -guest option 

Greetzzz Roland

----------

## Sivar

 *Fragile wrote:*   

> Maybe it does not see the Username Passwd correct ( The Win2K Machine )
> 
> Enabling the Guest Account on the Win2K should do it for now, then I should still look
> 
> for the problem why it does not connect properly with the specified Username/Passwd
> ...

 What -guest option? The man pages for smbclient and smbmnt didn't mention it. I tried "guest' as a username/PW, as well as no name, but neither seemed to work.

----------

## Fragile

Hi, 

With smbmount version 2.2.3a

you should have an option called guest

smbmount -o guest ( Of course the rest will remain the same Mountpoint & Service ). Then you are not prompted to enter a passwd, and will use the Win2K Guest account with his permissions. So you can add the permissions (NTFS) for the user Guest.

Greetz Roland

----------

