LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2002, 06:42 PM   #1
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Rep: Reputation: 30
A little Samba advice?


I'm trying to setup an old box I have as a printserver. The box is running Debian connected to an HP Laserjet 1100. I have configured the useraccounts and passwords using smbpasswd. I have enabled NETBIOS on my Windows boxes. All of the computers are on the same subnet. They can all ping each other. The correct workgroup name is being used on all.
Problem: Windows computers can't see printserver at all. Linux box can see printserver but can't print at all to it using CUPS which is what I'm using on the printserver
Here's my smb.conf
# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2002/11/12 16:58:16

# Global parameters
[global]
workgroup = N30
netbios name = PRINTSERVER
server string = %h server (Samba %v)
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
printcap name = /etc/printcap.cups
preferred master = True
domain master = True
dns proxy = No
default service = printers
message command = /bin/sh -c '/usr/bin/linpopup
path = /etc/printcap.cups
invalid users = root
hosts allow = 192.168.1
printing = cups
printer name = Laserjet

[homes]
comment = Home Directories
read only = No
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
path = /tmp
create mask = 0700
guest only = Yes
guest ok = Yes
printable = Yes
browseable = No

[Laserjet]
path = /tmp
read only = No
create mask = 0700
guest only = Yes
guest ok = Yes
printable = Yes
oplocks = No
 
Old 11-13-2002, 07:34 AM   #2
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Typo?
hosts allow = 192.168.1 should be hosts allow = 192.168.1.
 
Old 11-13-2002, 07:37 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Uhm... So you can ping 'printserver' from your windows boxes yeah? And am I right in thinking you are using CUPS on 'printserver' yeah, and you can print to the printer from command line on 'printerserver'? If so you only need the following in smb.conf to get the printers confirgure
Code:
load printers = yes
printing = cups
printcap name = cups
Have you got valid entries for 'printserver' in your DNS/hosts file on your windows machines?

cheers

Jamie...

Last edited by jharris; 11-13-2002 at 07:40 AM.
 
Old 11-13-2002, 06:07 PM   #4
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Almost there thanks to Linux Questions!

Almost there, thanks in no small part to people I've never met! Now I can print from all of my Windows boxes yet I cannot for the life of me print from my other Linux box. I have tried every combo ( ipp, http, remote CUPS) I can think of both in KDE Printing Manager and CUPS. Also, I can't connect as a user to the printserver. Since I can now see the printserver on my windows boxes I want to go ahead and make it a file server. Should I just make the /homes directory read and write for everyone? What am i missing for the password/logon problem? I enabled encrypted apsswords... Here's my smb.conf Thanks again!

# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2002/11/13 15:05:11

# Global parameters
[global]
workgroup = N30
netbios name = PRINTSERVER
server string = %h server (Samba %v)
encrypt passwords = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
printcap name = /etc/printcap.cups
preferred master = True
domain master = True
dns proxy = No
default service = printers
message command = /bin/sh -c '/usr/bin/linpopup
path = /etc/printcap.cups
username = nobody
hosts allow = 192.168.1.
printing = cups
printer name = Laserjet

[homes]
comment = Home Directories
read only = No
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
path = /tmp
create mask = 0700
guest only = Yes
guest ok = Yes
printable = Yes
browseable = No

[Laserjet]
path = /tmp
read only = No
create mask = 0700
guest only = Yes
guest ok = Yes
printable = Yes
 
Old 11-14-2002, 12:20 AM   #5
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Up and running

I have Samba running just fine now. I can post my smb.conf if anyone needs it. I can connect to the home directories on my Linux box from my Windows boxes. I can also print t my LaserJet hooked up to my file/printserver.
2 problems:

-can't print to printserver from my other Linux box, tried every
combo in CUPS, ideas?

-how do I get my Windows boxes to automatically map to the shared drive on the Linux boxes?

Last edited by bax; 11-14-2002 at 12:21 AM.
 
Old 11-14-2002, 02:44 AM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
So long as your other linux box is running cups too then its just a case of editing /etc/cups/client.conf so it know which server to look at then starting cupsd. You local cupsd will talk to cupsd on your print server and find all the queues.

As for the auto mapping drives - sounds to me like you want a Samba domain controller supporting roaming profiles. You map you drives on one machine and when you login to the next it restores them as it downloads your profile from the server.

cheers

Jamie...
 
Old 11-14-2002, 09:14 AM   #7
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Well, I looked at /etc/cups/client.conf. Only thing I could see to modify in there would be Servername so I tried the server anme of my printserver. That didn't work. I tried the socket (192.168.1.110:631) and the socket w/ /printers/Laserjet. I also tried ipp://printserver:631/printers and ipp 192.168.1.110 w/ every possible combination. Restarted CUPS w/ /etc/init.d/cupsys restart each time. What am I missing? Thanks for all of your help so far!
 
Old 11-14-2002, 10:55 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,675

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Any easy way is use window explorer and then select:
tools || map network drive
Then type in the path to your linux share and click the box to reconnect on start up.
 
Old 11-15-2002, 01:45 AM   #9
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Quote:
Originally posted by bax
Well, I looked at /etc/cups/client.conf. Only thing I could see to modify in there would be Servername so I tried the server anme of my printserver.
Yeah that should work. Can you ping the name of your server from the command line though? Cupsd need to be able to resolve the name to an IP address to work.
Quote:
Originally posted by bax
Restarted CUPS w/ /etc/init.d/cupsys restart each time. What am I missing? Thanks for all of your help so far!
Restarting cupsd on the client is correct. Had you edited anything else on the client side? When I was setting up my clients here I simply compiled cupsd from source, edited client.conf and started the daemon. Is there anything in your logs? Have a look in /var/log/cups (assuming they are in the default location).

cheers

Jamie...
 
Old 11-15-2002, 07:53 PM   #10
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
THis an interesting error I found in /var/log/cups/error
LoadAllClasses: Unable to open /etc/cups/classes.conf - No such file or directory
 
Old 11-17-2002, 01:40 PM   #11
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Update, banging head against wall right now

The main goal is printing right now. I have good connectivity (ping and resolve by NETBIOS name). I have enabled File and Print Sharing on my Windows clients as well as making the appropriate entries in my hosts file. NETBIOS is aslo enabled as well as using the IP address of the Samba box for WINS. I have added all users and computer NETBIOS names using useradd and then smbpasswd -a on the Samba box. When I run net view on a Windows box I get " System error 86 has occured. The specified network password is not correct." I have checked carefully and modified where necessary and I'm sure the logon name and password I'm using for Windows is on my Samba box. I've got 3 Linux books out in front of me and I'm obviously missing something. I was using SWAT but now I'm just using good ol vi. I would really appreciate any help the list might offer. Here is my smb.conf

# Global parameters
[global]
workgroup = N30
netbios name = PRINTSERVER
server string = %h server (Samba %v)
security = SHARE
encrypt passwords = Yes
update encrypted = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
printcap name = /etc/printcap.cups
os level = 85
preferred master = True
domain master = True
dns proxy = No
wins server = 192.168.1.110
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
invalid users = root
valid users = bax morbo amy guest Guest Bax
hosts allow = 192.168.1.
load printers = yes
printing = cups

[homes]
comment = Home Directories
browseable = Yes
writeable = Yes

[printers]
comment = All Printers
path = /var/spool/cups
guest ok = Yes
printable = Yes
writeable = No
use client driver = Yes

[Laserjet]
path = /var/spool/cups
guest ok = Yes
printable = Yes
writeable =No
printer name = Laserjet
use client driver = Yes
 
Old 11-17-2002, 10:36 PM   #12
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Rejected login from Windows PC

In my logs, I find the reoccuring error about rejected invalid user nobody. I added said user w/ useradd then smbpasswd -a. Changed the password several times but nothing. I t looks like my XP laptop is doing this. How do I change this on the XP laptop? Why is it trying to connect w/out my knowledge as nobody?
 
Old 11-18-2002, 06:10 AM   #13
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
The 'nobody' user is the guest account thats used to connect to the server when you initially logon (you need to connect to the server to check if you are allowed to connect to the server if you see what I mean). Is user nobody listed in /etc/passwd? What version of windows are you using on the client side?

cheers

Jamie...
 
Old 11-18-2002, 08:29 AM   #14
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Yeah, I tried deleting nobody in /etc/passwd and recreating it after seeing said errors but it didn't work. The only thing I can think of is that for some reason Windows wis trying to connect as a guest and Samba isn't allowing that. Either that or maybe I just can't get WIndows to connect as another user. I'm using XP home w/ FIle and Print Sharing enabled, NETBOIS enabled, and the Samba box as WINS. Whenever I run smbclient -L ipaddressofWindowsbox, I get the error "operation already in progress. Also, still get the error "the specified network password is not correct" whenever I run net view from my XP machine. I am running XP Home on the client side. I am apsting my smb.conf below. I was so frustrated yesterday I drove an hour to a really good bookstore (had O'reilly's entire line!) to buy a Samba book. The below smb.conf is the result of me trying to set security as low as possible using said book. I really appreciate everybody's help! Joining the Samba mailing list didn't help at all. EVERYBODY has problems on there and no one is willing to help

# Global parameters
[global]
workgroup = SHEP
netbios name = PRINTSERVER
server string = %h server (Samba %v)
security = SHARE
encrypt passwords = Yes
hosts equiv = morbo amy planet express
map to guest = Bad User
null passwords = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
username map = /etc/samba/smbusers
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
printcap name = /etc/printcap.cups
os level = 35
preferred master = True
domain master = False
dns proxy = No
wins support = Yes
default service = printers
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
socket address =
valid users = bax morbo amy guest Guest Bax
create mask = 0777
directory mask = 0777
printing = cups
lpq command =
lprm command =

[homes]
comment = Home Directories
write list = bax morbo amy guest Guest Bax
read only = No
guest ok = Yes

[printers]
comment = All Printers
path = /tmp
create mask = 0700
guest only = Yes
guest ok = Yes

printable = Yes
use client driver = Yes
browseable = No

[Laserjet]
comment = Laserjet
path = /tmp
create mask = 0700
guest only = Yes
guest ok = Yes
printable = Yes
printer name = Laserjet
use client driver = Yes
 
Old 11-18-2002, 08:57 AM   #15
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
I know that XP attempts to encrypt all session traffic by default. Have you looked into this? Its not something I've played with but I know a guy who has so I'll ask him where the registry key is to change this. Note that this is different to using encrypted passwords.

I take it that the username you use to logon to XP has an equivilent user on the server yeah?

cheers

Jamie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Upgrade Advice HighLife Linux - Newbie 3 09-14-2005 11:08 PM
Advice for laptop on samba? neocookie Linux - Networking 3 06-08-2005 06:55 AM
Advice on Samba setup (please!) Paulsuk Linux - Networking 14 03-15-2005 01:55 PM
Trouble configuring Samba with Fedora, any advice, heres my smb.conf trekgraham Linux - Networking 7 05-03-2004 03:29 PM
Samba / Routing advice please... chiefobeef Linux - Newbie 3 10-21-2003 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration