Samba and printer sharing help

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

Samba and printer sharing help

Postby JadElClemens on Sun Apr 29, 2012 9:49 pm

Before I start rambling off information I'll just say that my ultimate goal is to be able to print from my Linux Mint machine to a printer that is physically attached to a Windows 7 machine via USB.

Question 1 goes a bit like this: How do I even set up samba to do whatever it does to my Windows 7 machine? I don't even know what it is, all I know is I need it to be able to communicate with the Win7 machine and its network. On default Mint settings, is it set up to the extent that I need it to? What else do I need to do?

Question two is like this, yo: Once I know that I have Samba set up correctly, how do I connect my Mint machine and the Windows machine's printer? I've checked this resource and made sure all points are open on both machines as per section 5b. What other steps do I need to take to be able to use the printer? Will it just show up on the CUPS interface or the printers dialog after I correctly configure Samba?
User avatar
JadElClemens
Level 1
Level 1
 
Posts: 24
Joined: Mon Jan 30, 2012 11:24 pm

Linux Mint is funded by ads and donations.
 

Re: Samba and printer sharing help

Postby altair4 on Mon Apr 30, 2012 6:41 am

Samba has 2 parts: Server and Client. The client part ( accessing another machine's shares and printers ) is install by default in the Main edition.

2 initial pieces of information would aid in the troubleshooting so please post the output of the following commands:
Code: Select all
smbtree

Code: Select all
testparm -s
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4741
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and printer sharing help

Postby JadElClemens on Mon Apr 30, 2012 5:09 pm

altair4 wrote:Samba has 2 parts: Server and Client. The client part ( accessing another machine's shares and printers ) is install by default in the Main edition.

2 initial pieces of information would aid in the troubleshooting so please post the output of the following commands:
Code: Select all
smbtree

Code: Select all
jadelclemens@JEC-PC ~ $ smbtree
Enter jadelclemens's password:
WORKGROUP
   \\VERKAMP-PC (My family computer, to which the printer is attached)          
cli_start_connection: failed to connect to VERKAMP-PC<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
   \\JEC-PC               JEC-PC server (Samba, LinuxMint)
      \\JEC-PC\IPC$              IPC Service (JEC-PC server (Samba, LinuxMint))
      \\JEC-PC\print$            Printer Drivers (I haven't actually tried to attach a printer yet)
   \\DANIEL-PC (brother's personal PC)           
cli_start_connection: failed to connect to DANIEL-PC<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
jadelclemens@JEC-PC ~ $

altair4 wrote:
Code: Select all
testparm -s

Code: Select all
jadelclemens@JEC-PC ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
   server string = %h server (Samba, LinuxMint)
   map to guest = Bad User
   obey pam restrictions = Yes
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   unix password sync = Yes
   syslog = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   dns proxy = No
   usershare allow guests = Yes
   panic action = /usr/share/samba/panic-action %d

[printers]
   comment = All Printers
   path = /var/spool/samba
   create mask = 0700
   printable = Yes
   browseable = No

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
jadelclemens@JEC-PC ~ $
User avatar
JadElClemens
Level 1
Level 1
 
Posts: 24
Joined: Mon Jan 30, 2012 11:24 pm

Re: Samba and printer sharing help

Postby altair4 on Mon Apr 30, 2012 6:23 pm

THis error message from smbtree means that the system cannot resolve a host name to an ip address:
(0.0.0.0). Error NT_STATUS_UNSUCCESSFUL

I've checked this resource and made sure all points are open on both machines as per section 5b.

The resource you referenced above is this one: Samba Browsing Problems Checklist: viewtopic.php?f=42&t=88146&start=0

But you didn't do step4:

Edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Add a line to the [global] section - right under the "workgroup" line:
Code: Select all
name resolve order = bcast host lmhosts wins

Then restart samba:
Code: Select all
sudo service smbd restart


Wait about 5 minutes for the network to settle down and then run smbtree again and see if the error message went away.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4741
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba and printer sharing help

Postby JadElClemens on Mon Apr 30, 2012 7:40 pm

altair4 wrote:But you didn't do step4:

Edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Add a line to the [global] section - right under the "workgroup" line:
Code: Select all
name resolve order = bcast host lmhosts wins

Then restart samba:
Code: Select all
sudo service smbd restart

Actually, I did that step. I'll do it again, though, just to check.

EDIT:
Did it, one less error, though.
Code: Select all
jadelclemens@JEC-PC ~ $ smbtree
Enter jadelclemens's password:
WORKGROUP
   \\VERKAMP-PC           
cli_start_connection: failed to connect to VERKAMP-PC<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
   \\JEC-PC               JEC-PC server (Samba, LinuxMint)
      \\JEC-PC\IPC$              IPC Service (JEC-PC server (Samba, LinuxMint))
      \\JEC-PC\print$            Printer Drivers
   \\DANIEL-PC     


I did it again just to check:
Code: Select all
jadelclemens@JEC-PC ~ $ smbtree
Enter jadelclemens's password:
WORKGROUP
   \\VERKAMP-PC           
cli_start_connection: failed to connect to VERKAMP-PC<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
   \\JEC-PC               JEC-PC server (Samba, LinuxMint)
      \\JEC-PC\IPC$              IPC Service (JEC-PC server (Samba, LinuxMint))
      \\JEC-PC\print$            Printer Drivers
   \\DANIEL-PC            
cli_start_connection: failed to connect to DANIEL-PC<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
User avatar
JadElClemens
Level 1
Level 1
 
Posts: 24
Joined: Mon Jan 30, 2012 11:24 pm

Re: Samba and printer sharing help

Postby altair4 on Tue May 01, 2012 6:28 am

Actually, I did that step. I'll do it again, though, just to check.

But the original output of testparm didn't show it.

Run the following command:
Code: Select all
testparm -s

And see if it lists the line you added:
name resolve order = bcast host lmhosts wins

If it does not then you either have it in the wrong place ( it should be in the [global] section - right under workgroup ), or you put a "#" or ";" in front of it which tells Samba to ignore it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4741
Joined: Tue Feb 03, 2009 10:27 am


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 3 guests