Web lists-archives.com

[Samba] Shared printing between Linux (client) and Windows (server): NT_STATUS_ACCESS_DENIED

Thank you for answer.

Logged in as Guest, then went to Security tab. I see `Everyone', it is given all permissions. Then I went to `Current permissions' tab (I have localized OS at the moment, so probably it is not correct name) and typed in `Everyone' and `Guest' as well: all five permission types are checked.

$ smbclient -L -m SMB2

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Удаленный Admin
    C$              Disk      Стандартный общий ресурс
    D$              Disk      Стандартный общий ресурс
    F$              Disk      Стандартный общий ресурс
    H$              Disk      Стандартный общий ресурс
    hp1516          Printer   hp1516
    IPC$            IPC       Удаленный IPC
    print$          Disk      Драйверы принтеров
    Public          Disk
    Users           Disk
SMB1 disabled -- no workgroup available
             end of cmd output

Then I edited smb.conf as you instructed and made
$ sudo service smbd restart
$ sudo service nmbd restart
Then again test printing command, access denied.

I noticed a thing: let it be a pseudocode and
    PRINT_CMD = echo -en "pisos\n" | smbclient "\\\\\\hp1516" "" -c "print -" -N

If I type
$ PRINT_CMD -U username

then I receive different errors: if username is equal to a Linux local machine user, ACCESS_DENIED is the case; if username is equal to a windows user (`Guest', `Admin', etc), then I have
"session setup failed: NT_STATUS_LOGON_FAILURE". But if I specify `-U LOCAL\windowsusername', it gives ACCESS_DENIED.

I set up an account on both systems with the same credentials: user:password. Given him necessary print privileges on Windows machine. On Linux system the user was added to lp group as well. Now I can successfully login onto the printer! The command is:

$ echo -en "asdfg\n" | smbclient "\\\\\\hp1516" "password" -c "print -" -U user
putting file - as stdin-4710 (0,8 kb/s) (average 0,8 kb/s)

Unfortunately, printer does not do anything, just idling.  In Windows logs I can see successful logon audit followed by an immediate logout.

I tried to give some commands, but no visible result was produced:

$ smbclient "\\\\\\hp1516" "password" -c "queue" -U user -m SMB2
smb1cli_req_writev_submit: called for dialect[SMB2_10] server[]

$ smbclient "\\\\\\hp1516" "password" -c "posix_open /home/kotee/file.txt" -U user -m SMB2
smb1cli_req_writev_submit: called for dialect[SMB2_10] server[]
smb1cli_req_writev_submit: called for dialect[SMB2_10] server[]
Failed to open file \home\kotee\file.txt. NT_STATUS_REVISION_MISMATCH

Finally, I try to upgrade SAMBA with the repository you provided, but I am failing.

$ cat /etc/apt/sources.list.d/van-belle.list
# AptVanBelle repo for samba.
deb http://apt.van-belle.nl/ubuntu bionic-samba410 main contrib non-free

$ sudo apt-get upgrade
Ошб:10 http://apt.van-belle.nl/ubuntu bionic-samba49 Release
  404  Not Found [IP: 80]
E: Репозиторий «http://apt.van-belle.nl/ubuntu bionic-samba49 Release» не содержит файла Release.
N: Обновление из этого репозитория нельзя выполнить безопасным способом, поэтому по умолчанию он отключён.
N: Информацию о создании репозитория и настройке пользователя смотрите в справочной странице apt-secure(8).

At least I want to try upgrading and doing the same cmds as earlier to see what result I would receive, so lets try together to fix my fault with repo, please...

To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba