Logon failure trying to print using Samba

0

I'm trying to set up a CUPS print server on a Knoppix system for use by Windows clients in an Active Directory domain. So far, I've had success with printing over IPP. Now I want to explore the possibility of using Samba to access the printers. I've undertaken the following steps to set up the printer:

  • Added the printer to CUPS using the Windows Printer via Samba (Windows) option, giving the URL smb://<user name>@<IP address>/<printer share name>.
  • Set the Samba workgroup to the Windows domain name
  • Added a user of the same name to the system using sudo useradd <user name> --shell /bin/false
  • Set the corresponding windows domain user's password using sudo smbpasswd -a <user name>.
  • Finally, I set the workgroup name in the Samba configuration file to the windows domain name.

Trying to print the test page on the newly set up printer gives me the following error:

Session setup failed:
NT_STATUS_LOGON_FAILURE

These are the relevant settings in my smb.conf:

[global]
workgroup = MY-DOMAIN-NAME
security = share
printcap name = cups
use client driver = yes
[printers]
path = /var/spool/samba
printable = yes
create mask = 0700
use client driver = yes
[print$]
path = /var/lib/samba/printers
guest ok = yes
write list = root some.domainuser
force group = @ntadmin
directory mask = 0775
create mask = 0664

Have I overlooked something or made a mistake with this setup?

waldrumpus

Posted 2013-01-23T15:14:29.767

Reputation: 439

Answers

0

What version of Windows are you using? On Windows 7 you should be able to right click the printer and go to Printer Properties from there go to ports. Select the port you use and configure it. Under Security Options select the appropriate button. More than likely you'll want to use "Automatically use the Windows logon name and password"

davelupt

Posted 2013-01-23T15:14:29.767

Reputation: 189

I've just had a look: There are some ports listed, but none is checked and all are grayed out, meaning I probably can't change their settings. I'm an administrator on my Windows 7 machine. Do I have to have elevated rights for this? – waldrumpus – 2013-03-14T13:31:51.617

Update: I've just had a look at the printer settings of a printer shared from a Windows machine. In there, I can readily change the port settings, and one of them is checked. – waldrumpus – 2013-03-14T13:33:49.780

The smb://<user name>@<IP address>/<printer share name> that you are using is for when you're trying to connect CUPS to use a printer that is located on a Windows machine rather than using a Windows client to connect to a printer located on a Samba machine. – davelupt – 2013-03-16T18:20:58.963

What happens when you go into Windows cmd and type net use * \ipaddress\printers /u:username ? Given that you've set up a Unix user account of the same name as the Samba user and given the Samba user a password, it should ask you for a password. – davelupt – 2013-03-16T18:22:58.977

One last thing. What does your smb.conf look like? – davelupt – 2013-03-16T18:25:00.803

See my edit for the smb.conf. Typing net use * \\ipaddress\printers /u:username doesn't ask for a password; it adds a share to my machine. If I double-click its icon, it says "Auf Z:\ kann nicht zugegriffen werden. Die Hardware hat einen Speicherfehler gemeldet, der nicht behoben werden kann." - In English, roughly: "Can't access Z:. Hardware reports a memory error from which it can't recover."

[OK] – waldrumpus – 2013-03-22T11:59:30.693

Are you on the same subnet as the server? Going cross subnet will present problems if you don't have a wins server running. Also, make sure you have network discovery enabled, then you should be able to browse to it within your network folder. If you want it to request a new user name/password every time check this link [link] http://www.linuxquestions.org/questions/linux-server-73/turning-off-samba-user-credentials-cache-721057/

– davelupt – 2013-03-25T00:10:21.557