Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cups , Samba and Windows Printing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Wed Oct 17, 2007 1:53 am    Post subject: Cups , Samba and Windows Printing Reply with quote

Hello world,

I've had a problem pop up from no where last week. I can't print to my windows printer anymore. I get the following message in cups

Quote:
"Unable to connect to CIFS host, will retry in 60 seconds..."


then eventually i get

Quote:
"/usr/libexec/cups/backend/smb failed"


Thing is, i thought i fixed this problem by setting my samba box here as the domain master in smb.conf. I was then able to view smbtree and I printed a document. Today, i get the same problem and searching around the web didn't get me far.

Here is the error from smbtree

Quote:
$ smbtree -U siddig%
WORKGROUP
\\STALIN Samba Linux Server 3.0.24
\\STALIN\IPC$ IPC Service (Samba Linux Server 3.0.24)
\\STALIN\misc misc drive
\\STALIN\bin
\\REDBLACK
timeout connecting to 66.150.2.134:445
timeout connecting to 66.150.2.134:139
Error connecting to 66.150.2.134 (Operation already in progress)
cli_start_connection: failed to connect to REDBLACK<20> (66.150.2.134)


I don't even think my WAN ip address starts with a 66. any tips are appreciated.
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Sat Oct 20, 2007 3:21 pm    Post subject: Reply with quote

bump.

still have no solution. anyone please?


Quote:
Description: HP Laserjet 1100
Make and Model: HP LaserJet 1100 Foomatic/ljet4 (recommended)
Device URI: smb://redblack/laserjet1100
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Sat Oct 20, 2007 3:34 pm    Post subject: Reply with quote

seems like samba is my problem. i can't locate my windows computers using their name:


Quote:
# smbclient -L redblack -N
timeout connecting to 66.150.2.134:445
timeout connecting to 66.150.2.134:139
Error connecting to 66.150.2.134 (Operation already in progress)
Connection to redblack failed

# smbclient -I 192.168.0.202 -L redblack -N
Domain=[REDBLACK] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
muzic2 Disk
IPC$ IPC Remote IPC
X$ Disk Default share
print$ Disk Printer Drivers
Backup Disk
Laserjet1100 Printer HP LaserJet 1100 (MS)
DCIM Disk
muzic Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
Shared Disk
Backup-07-03-01 Disk
Laser4P Printer HP LaserJet 4P
Domain=[REDBLACK] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------



Quote:
[global]

# 1. Server Naming Options:
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = WORKGROUP

# netbios name is the name you will see in "Network Neighbourhood",
# but defaults to your hostname
; netbios name = <name_of_this_server>

# server string is the equivalent of the NT Description field
server string = Samba Linux Server %v

# 2. Printing Options:
# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = cups
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = cups

# 3. Logging Options:
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Set the log (verbosity) level (0 <= log level <= 10)
; log level = 3

# 4. Security and Domain Membership Options:
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page. Do not enable this if (tcp/ip) name resolution does
# not work for all the hosts in your network.
hosts allow = 192.168.0. 127.

hosts deny = 0.0.0.0/0

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
# Allow users to map to guest:
# Allow users to map to guest:
map to guest = bad user

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = share
# Use password server option only with security = server or security = domain
# When using security = domain, you should use password server = *
; password server = <NT-Server-Name>
; password server = *

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
# Encrypted passwords are required for any use of samba in a Windows NT domain
# The smbpasswd file is only required by a server doing authentication, thus
# members of a domain do not need one.
encrypt passwords = yes

# The following are needed to allow password changing from Windows to
# also update the Linux system password.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
# You either need to setup a passwd program and passwd chat, or
# enable pam password change
; pam password change = yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \
;*passwd:*all*authentication*tokens*updated*successfully*

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /etc/samba/smb.conf.%m

# Options for using winbind. Winbind allows you to do all account and
# authentication from a Windows or samba domain controller, creating
# accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's
# and gid's. idmap uid and idmap gid are the only required parameters.
#
# winbind separator is the character a user must use between their domain
# name and username, defaults to "\"
; winbind separator = +
#
# winbind use default domain allows you to have winbind return usernames
# in the form user instead of DOMAIN+user for the domain listed in the
# workgroup parameter.
; winbind use default domain = yes
#
# template homedir determines the home directory for winbind users, with
# %D expanding to their domain name and %U expanding to their username:
; template homedir = /home/%D/%U

# When using winbind, you may want to have samba create home directories
# on the fly for authenticated users. Ensure that /etc/pam.d/samba is
# using 'service=system-auth-winbind' in pam_stack modules, and then
# enable obedience of pam restrictions below:
; obey pam restrictions = yes

#
# template shell determines the shell users authenticated by winbind get
; template shell = /bin/bash

# 5. Browser Control and Networking Options:
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24

# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
; remote announce = 192.168.1.255 192.168.2.44

# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes

# 6. Domain Control Options:
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations or Primary Domain Controller for WinNT and Win2k
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roaming profiles for WinNT and Win2k
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

# Where to store roaming profiles for Win9x. Be careful with this as it also
# impacts where Win2k finds it's /HOME share
; logon home = \\%L\%U\.profile


# The add user script is used by a domain member to add local user accounts
# that have been authenticated by the domain controller, or when adding
# users via the Windows NT Tools (ie User Manager for Domains).

# Scripts for file (passwd, smbpasswd) backend:
; add user script = /usr/sbin/useradd -s /bin/false '%u'
; delete user script = /usr/sbin/userdel '%s'
; add user to group script = /usr/bin/gpasswd -a '%u' '%g'
; delete user from group script = /usr/bin/gpasswd -d '%u' '%g'
; set primary group script = /usr/sbin/usermod -g '%g' '%u'
; add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F: '{print $3}'
; delete group script = /usr/sbin/groupdel '%g'
# 7. Name Resolution Options:
# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
name resolve order = wins host lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no

# 8. File Naming Options:
# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no

# Enabling internationalization:
# you can match a Windows code page with a UNIX character set.
# Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
# 852 (Czech), 861 (???), 932 (Japanese),
# 936 (Simplified Chin.), 949 (Korean Hangul),
# 950 (Trad. Chin.).
# More detail about code page is in
# "http://www.microsoft.com/globaldev/reference/oslocversion.mspx"
# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
# This is an example for french users:
; dos charset = 850
; unix charset = ISO8859-1
Back to top
View user's profile Send private message
mallchin
l33t
l33t


Joined: 21 Jan 2003
Posts: 655
Location: United Kingdom

PostPosted: Mon Oct 22, 2007 9:01 am    Post subject: Reply with quote

I have a similar issue. It was all working but something (an update?) broke it.

I can connect via smbclient, but I get:

Code:

Anonymous login successful
Domain=[DPS] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename       Type      Comment
        ---------       ----      -------
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine sergio-pc.  Error was NT_STATUS_ACCESS_DENIED
Error returning browse list: NT_STATUS_ACCESS_DENIED
Anonymous login successful
Domain=[DPS] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------


I've seen this error before. I'm going to Google it now.
_________________
6700 @ 2.66GHz, 4Gb RAM, 2 x 500Gb, 8800 GTX, PhysX, X-Fi, 24" Widescreen, Tux mascot
Back to top
View user's profile Send private message
mallchin
l33t
l33t


Joined: 21 Jan 2003
Posts: 655
Location: United Kingdom

PostPosted: Mon Oct 22, 2007 9:17 am    Post subject: Reply with quote

It all comes back to me now.

Quote:

The problem is in the windows XP setup. For some reason on xp you must go to "add/remove programs" in the control panel and on the left will be a button for Windows components. Click on it and under "other network file and print services" you will find "print services for Unix". Make sure that it is checked and hit ok. When setting up in Mepis, set up as remote lpr/lpd. and give the ip address to the machine. Everything should work well after all that.


I decided to use a different printer as I can't access the Windows machine at present.
_________________
6700 @ 2.66GHz, 4Gb RAM, 2 x 500Gb, 8800 GTX, PhysX, X-Fi, 24" Widescreen, Tux mascot
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Tue Oct 23, 2007 12:28 am    Post subject: Reply with quote

mallchin wrote:
It all comes back to me now.

Quote:

The problem is in the windows XP setup. For some reason on xp you must go to "add/remove programs" in the control panel and on the left will be a button for Windows components. Click on it and under "other network file and print services" you will find "print services for Unix". Make sure that it is checked and hit ok. When setting up in Mepis, set up as remote lpr/lpd. and give the ip address to the machine. Everything should work well after all that.


I decided to use a different printer as I can't access the Windows machine at present.



I enabled Unix Print Services but I get the same error "CIFS Host . . . "

Its strange because both of my gentoo boxes got this problem around the same time. I'm surprised this post hasn't attracted attention since it seems to be the only one related to this obscure problem.
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Tue Oct 23, 2007 12:37 am    Post subject: Reply with quote

more strange errors....


Quote:
$ smbclient -L redblack
Error connecting to 8.15.7.117 (Connection refused)
Connection to redblack failed
$ nmblookup redblack
querying redblack on 192.168.0.255
192.168.0.201 redblack<00>
$ smbclient -I 192.168.0.201 -L redblack
Password:
Domain=[REDBLACK] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
muzic2 Disk
IPC$ IPC Remote IPC
X$ Disk Default share
print$ Disk Printer Drivers
Backup Disk
Laserjet1100 Printer HP LaserJet 1100 (MS)
DCIM Disk
muzic Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
Shared Disk
Backup-07-03-01 Disk
Laser4P Printer HP LaserJet 4P
Domain=[REDBLACK] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------



ok here's the debug info...

Quote:
# smbclient -d 10 -L redblack
INFO: Current debug levels:
all: True/10
tdb: False/0
printdrivers: False/0
lanman: False/0
smb: False/0
rpc_parse: False/0
rpc_srv: False/0
rpc_cli: False/0
passdb: False/0
sam: False/0
auth: False/0
winbind: False/0
vfs: False/0
idmap: False/0
quota: False/0
acls: False/0
locking: False/0
msdfs: False/0
dmapi: False/0
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter server string = Samba Linux Server %v
doing parameter printcap name = cups
doing parameter load printers = yes
doing parameter printing = cups
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 50
doing parameter hosts allow = 192.168.0. 127.
doing parameter map to guest = bad user
doing parameter security = share
doing parameter encrypt passwords = yes
doing parameter socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
doing parameter domain master = yes
doing parameter preferred master = yes
doing parameter name resolve order = wins host lmhosts bcast
doing parameter wins support = yes
doing parameter dns proxy = yes
pm_process() returned Yes
lp_servicenumber: couldn't find homes
set_server_role: role = ROLE_STANDALONE
Attempting to register new charset UCS-2LE
Registered charset UCS-2LE
Attempting to register new charset UTF-16LE
Registered charset UTF-16LE
Attempting to register new charset UCS-2BE
Registered charset UCS-2BE
Attempting to register new charset UTF-16BE
Registered charset UTF-16BE
Attempting to register new charset UTF8
Registered charset UTF8
Attempting to register new charset UTF-8
Registered charset UTF-8
Attempting to register new charset ASCII
Registered charset ASCII
Attempting to register new charset 646
Registered charset 646
Attempting to register new charset ISO-8859-1
Registered charset ISO-8859-1
Attempting to register new charset UCS2-HEX
Registered charset UCS2-HEX
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
Substituting charset 'UTF-8' for LOCALE
added interface ip=192.168.0.215 bcast=192.168.0.255 nmask=255.255.255.0
Netbios name list:-
my_netbios_names[0]="STALIN"
Client started (version 3.0.24).
internal_resolve_name: looking up redblack#20
Opening cache file at /var/cache/samba/gencache.tdb
Returning expired cache entry: key = NBT/REDBLACK#20, value = 66.150.2.134:0, timeout = Sat Oct 20 11:06:34 2007
no entry for redblack#20 found.
Deleting cache entry (key = NBT/REDBLACK#20)
resolve_wins: Attempting wins lookup for name redblack<0x20>
Cache entry with key = WINS_SRV_DEAD/127.0.0.1,0.0.0.0 couldn't be found
wins_srv_is_dead: 127.0.0.1 is alive
resolve_wins: using WINS server 127.0.0.1 and tag '*'
bind succeeded on port 0
Sending a packet of len 50 to (127.0.0.1) on port 137
read_udp_socket: lastip 127.0.0.1 lastport 137 read: 62
parse_nmb: packet id = 11519
Received a packet of len 62 from (127.0.0.1) port 137
nmb packet from 127.0.0.1(137) header: id=11519 opcode=Query(0) response=Yes
header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
answers: nmb_name=REDBLACK<20> rr_type=32 rr_class=1 ttl=6130
answers 0 char .....u hex 0000080F0775
Got a positive name query response from 127.0.0.1 ( 8.15.7.117 )
remove_duplicate_addrs2: looking for duplicate address/port pairs
namecache_store: storing 1 address for redblack#20: 8.15.7.117:0
Adding cache entry with key = NBT/REDBLACK#20; value = 8.15.7.117:0 and timeout = Mon Oct 22 19:52:54 2007
(660 seconds ahead)
internal_resolve_name: returning 1 addresses: 8.15.7.117:0
Connecting to 8.15.7.117 at port 445
error connecting to 8.15.7.117:445 (Connection refused)
Connecting to 8.15.7.117 at port 139
error connecting to 8.15.7.117:139 (Connection refused)
Error connecting to 8.15.7.117 (Connection refused)
lang_tdb_init: /usr/lib/samba/en_US.UTF-8.msg: No such file or directory
Connection to redblack failed



error from samba logs

Quote:
[2007/10/22 18:16:29, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 192.168.0.201. Error = Connection reset by peer
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Tue Oct 23, 2007 7:43 am    Post subject: Reply with quote

try setting smb port = 445 in smb.conf
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
mallchin
l33t
l33t


Joined: 21 Jan 2003
Posts: 655
Location: United Kingdom

PostPosted: Tue Oct 23, 2007 8:59 am    Post subject: Reply with quote

nmb returns 192.168.0.201 for redblack...

sonix wrote:

$ nmblookup redblack
querying redblack on 192.168.0.255
192.168.0.201 redblack<00>



The (outdated) cache returns 66.150.2.134...

sonix wrote:

internal_resolve_name: looking up redblack#20
Opening cache file at /var/cache/samba/gencache.tdb
Returning expired cache entry: key = NBT/REDBLACK#20, value = 66.150.2.134:0, timeout = Sat Oct 20 11:06:34 2007
no entry for redblack#20 found.



And WINS server on localhost returns 8.15.7.117...

sonix wrote:

resolve_wins: using WINS server 127.0.0.1 and tag '*'
bind succeeded on port 0
Sending a packet of len 50 to (127.0.0.1) on port 137
read_udp_socket: lastip 127.0.0.1 lastport 137 read: 62
parse_nmb: packet id = 11519
Received a packet of len 62 from (127.0.0.1) port 137
nmb packet from 127.0.0.1(137) header: id=11519 opcode=Query(0) response=Yes
header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
answers: nmb_name=REDBLACK<20> rr_type=32 rr_class=1 ttl=6130
answers 0 char .....u hex 0000080F0775
Got a positive name query response from 127.0.0.1 ( 8.15.7.117 )
remove_duplicate_addrs2: looking for duplicate address/port pairs
namecache_store: storing 1 address for redblack#20: 8.15.7.117:0
Adding cache entry with key = NBT/REDBLACK#20; value = 8.15.7.117:0 and timeout = Mon Oct 22 19:52:54 2007
(660 seconds ahead)
internal_resolve_name: returning 1 addresses: 8.15.7.117:0



Try defining redblack in /etc/hosts :)
_________________
6700 @ 2.66GHz, 4Gb RAM, 2 x 500Gb, 8800 GTX, PhysX, X-Fi, 24" Widescreen, Tux mascot
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Wed Oct 24, 2007 7:19 pm    Post subject: Reply with quote

what if dhcp decides that the IP address should change today?


meh, i guess i'll go static.
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Thu Oct 25, 2007 12:24 am    Post subject: Reply with quote

Make sure your XP system registers itself with your WINS server (TCP/IP properties).
Compile Samba with winbind support (but you wont be running winbindd) and edit the hosts: line in /etc/nsswitch.conf to read
Code:
hosts:       files dns wins


Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Sat Oct 27, 2007 2:19 am    Post subject: Reply with quote

darkphader wrote:
Make sure your XP system registers itself with your WINS server (TCP/IP properties).
Compile Samba with winbind support (but you wont be running winbindd) and edit the hosts: line in /etc/nsswitch.conf to read
Code:
hosts:       files dns wins


Chris


i recompiled samba with winbind support and added winbind to rc-update. are you sure i should remove it? i actually don't remember how i added it. if you could remind me that would be nice.
Back to top
View user's profile Send private message
Lex_Brugman
n00b
n00b


Joined: 28 Mar 2004
Posts: 43
Location: Netherlands

PostPosted: Sat Oct 27, 2007 9:02 pm    Post subject: Reply with quote

Check if /usr/libexec/cups/backend/smb exists, if not: ln -s /usr/bin/smbspool /usr/libexec/cups/backend/smb
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Sat Oct 27, 2007 9:34 pm    Post subject: Reply with quote

sonix wrote:
i recompiled samba with winbind support and added winbind to rc-update. are you sure i should remove it? i actually don't remember how i added it. if you could remind me that would be nice.

Right. If you don't build with winbind support you don't get the libraries to support hosts lookups via WINS. Basically there are times (such as this one) when you want to compile with winbind support yet not actually run winbind. The way to start winbind in Gentoo (which you don't need to do) is to edit the /etc/conf.d/samba file and add it to the daemon_list.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
sonix
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 102

PostPosted: Sun Oct 28, 2007 2:26 pm    Post subject: Reply with quote

Lex_Brugman wrote:
Check if /usr/libexec/cups/backend/smb exists, if not: ln -s /usr/bin/smbspool /usr/libexec/cups/backend/smb


Quote:
# ls -l /usr/libexec/cups/backend/smb
lrwxrwxrwx 1 root root 17 2007-10-22 20:53 /usr/libexec/cups/backend/smb -> /usr/bin/smbspool

# smbtree
Password:
WORKGROUP
\\STALIN Samba Linux Server 3.0.26a
\\STALIN\IPC$ IPC Service (Samba Linux Server 3.0.26a)
\\STALIN\misc misc drive
\\STALIN\bin
\\REDBLACK
Error connecting to 63.251.179.13 (Connection refused)
cli_start_connection: failed to connect to REDBLACK<20> (63.251.179.13). Error NT_STATUS_CONNECTION_REFUSED
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Sun Oct 28, 2007 7:19 pm    Post subject: Reply with quote

DaggyStyle wrote:
try setting smb port = 445 in smb.conf

Actually the parameter is "smb ports" (not "smb port" - testparm should identify this) and if you want normal NetBIOS browsing, etc. you probably want to leave it at the default (139 445) or, if anything, limit it to port 139 instead:
Code:
smb ports = 139
or
Code:
smb ports = 445 139
which is the same as leaving the line out or commented.

Chris
_________________
WYSIWYG - What You See Is What You Grep


Last edited by darkphader on Sun Oct 28, 2007 7:40 pm; edited 2 times in total
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Sun Oct 28, 2007 7:36 pm    Post subject: Reply with quote

Recommended changes to your posted smb.conf:

Code:
hosts allow = 192.168.0. 127.  ;probably not necessary - should certainly be removed for troubleshooting

hosts deny = 0.0.0.0/0 ;remove this line completely

security = share ;needs to be security = user for proper operation, especially in this context

;username map = /etc/samba/smbusers ;uncomment this, you want it

The above lines (minus the 2 not needed) should now read:
Code:
security = user
username map = /etc/samba/smbusers


And at the very least the above referenced /etc/samba/smbusers file should contain:
Code:
nobody = guest


Make these changes, stop samba, locate your wins.dat file, delete it, start samba.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Sun Oct 28, 2007 7:52 pm    Post subject: Reply with quote

Quote:
Domain=[REDBLACK] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Another oddity is that apparently your domain name (redblack) and the system you're trying to connect to (redblack) are the same - this should not be the case. The domain name or workgroup name (if you're not running a domain) must be different. In the case of your samba server you're setting the workgroup/domain name to WORKGROUP, you should do the same on your other systems - or change samba to match - but do not use the same name for a host name.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
SkyLeach
Apprentice
Apprentice


Joined: 05 Nov 2002
Posts: 177
Location: Knoxville, TN

PostPosted: Sun Oct 28, 2007 8:33 pm    Post subject: Reply with quote

the mount.cifs stuff was recently broken out of the main samba branch. I ran into multiple CIFS issues this week and found that all of them were solved by doing the following (note: you might want to specify a version number, I typically use the latest versions with samba and CIFS because 1.) they release good code and 2.) microsoft changes things and pushes them out on msupdate that breaks windows-linux interoperation):

Code:
emerge --sync
echo "net-fs/mount-cifs ~x86" >> /etc/portage/package.keywords
emerge -uDv --newuse mount-cifs
revdep-rebuild


You might be able to get by with just merging mount-cifs, but since it split from samba it's wise to update all of it.
_________________
-SL

http://www.skyleach.org
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Sun Oct 28, 2007 8:55 pm    Post subject: Reply with quote

SkyLeach wrote:
the mount.cifs stuff was recently broken out of the main samba branch

That could be somewhat misleading. It is more accurate to say that the building of mount.cifs - still a standard part of Samba, has been arbitrarily split by the Gentoo dev team into a separate ebuild in order to allow for its installation w/o installing Samba itself. The kernel module cifs is still usable w/o the mount.cifs helper app, but the helper does add some niceties.

I personally don't like the extra ebuild, and it certainly causes a problem when you're used to a normal Samba install - where mount.cifs gets built and installed by default and now all of sudden you find it missing.
That aside, it has nothing to do with the problem at hand.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
SkyLeach
Apprentice
Apprentice


Joined: 05 Nov 2002
Posts: 177
Location: Knoxville, TN

PostPosted: Wed Oct 31, 2007 4:09 pm    Post subject: Reply with quote

darkphader wrote:
SkyLeach wrote:
the mount.cifs stuff was recently broken out of the main samba branch

That could be somewhat misleading. It is more accurate to say that the building of mount.cifs - still a standard part of Samba, has been arbitrarily split by the Gentoo dev team into a separate ebuild in order to allow for its installation w/o installing Samba itself. The kernel module cifs is still usable w/o the mount.cifs helper app, but the helper does add some niceties.

I personally don't like the extra ebuild, and it certainly causes a problem when you're used to a normal Samba install - where mount.cifs gets built and installed by default and now all of sudden you find it missing.
That aside, it has nothing to do with the problem at hand.

Chris

I was unable to mount any windows shares served from AD or NT domains until I merged it, so I thought since he is getting CIFS errors it might be related.
_________________
-SL

http://www.skyleach.org
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1225
Location: Motown

PostPosted: Wed Oct 31, 2007 5:56 pm    Post subject: Reply with quote

SkyLeach wrote:
I was unable to mount any windows shares served from AD or NT domains until I merged it, so I thought since he is getting CIFS errors it might be related.

It's not related. It's a helper app that interfaces with the kernels cifs module, which is only used in mounting. I doubt you need mount.cifs at all but the options aren't the same without it. Last I examined it w/o mount.cifs only the IP address was valid, not the NetBIOS name. Other options that mount.cifs provides may be missing or different when dealing with the kernel module more directly. It (mount.cifs) should not be necessary but possibly desirable.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
Icethepenguin
Apprentice
Apprentice


Joined: 01 Nov 2003
Posts: 252
Location: Loganville, Ga

PostPosted: Wed Apr 16, 2008 3:41 am    Post subject: Reply with quote

I know this may have been long figured out, but have this same problem and I figured out the problem.

My computers all went down due to a power outage (get it, I guy with 7 top computers doesn't have a UPS, lol) but what I had to do was just turn my /etc/hosts to point to the correct new 192.168.1.? and it found windows and all was well and printing.

I hope this simple fix works for you like it did for me.

Kevin
_________________
Sometimes you have to take that leap, then build your wings on the way down.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum