Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: printing to winXP
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Glenn
n00b
n00b


Joined: 23 Jun 2003
Posts: 47
Location: Whenuapai, Auckland, New Zealand

PostPosted: Fri Oct 03, 2003 11:13 am    Post subject: HOWTO: printing to winXP Reply with quote

Finally succeeding at being able to print to my winXP box from Linux (for the second time, err) I figured I will try and share my solution with everyone.

First install samba, cups and foomatic.
Code:
#emerge /usr/portage/net-fs/samba/samba-3.0.0-r1.ebuild
#emerge cups
#emerge foomatic


Note that this is version 3.0.0. At the moment portage defaults at 2.2.8 but I ran into difficulties with authentication between my two machines with this version

Cups and samba also have to be started so...
Code:
#/etc/init.d/samba start
#/etc/init.d/cupsd start


/etc/samba/smb.conf needs to be adjusted accordingly. Mine has the following. The most important things are workgroup and [printers]
Code:
[global]
   workgroup = Home
   server string = Samba Server %v

   printcap name = cups
   load printers = yes
   printing = cups

   log file = /var/log/samba/log.%m
   max log size = 50
   security = user
   encrypt passwords = yes
   smb passwd file = /etc/samba/private/smbpasswd
   dns proxy = no

[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   public = yes
guest ok = yes
   writable = no
   printable = yes
   printer admin = root
   create mode = 0700

[print$]
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   write list = @adm root


Now you need to install the printer. In KDE this can be done in the control panel --> peripherals --> printers. Use the printer wizard and set up an SMB shared printer. You can use the scan tool to search the network to find the printer you want to use.

Likewise, foomatic can be used to set up a printer.
Code:
#foomatic-configure -s cups -p HP-DeskJet_810C -c smb://user:password@HOME/DOWNSTAIRS/PRINTER -n ThePrinter -d hpijs


where HP-DeskJet_810C is the name of my printer (found in /usr/share/foomatic/db/source/printer/)
and smb://user:password@HOME/DOWNSTAIRS/PRINTER is the location of the networked printer.
ThePrinter is what I want to name the printer.

Hpijs is the driver I need to use. In my case I had to emerge hpijs. To find out what driver you need, www.linuxprinting.org has a search tool.

Next the cups drivers have to be downloaded and installed onto the winXP machine. http://cups.org/software.php will have these and the install script will stick them in the right place provided your smb.conf is set up right.
To install them to the winXP machine go:
Code:
#cupsaddsmb -v -a


With any luck, you should now be able to print out a test page. The kde control panel can do this but http://127.0.0.1:631/ also has some useful tools.

Hope this is helpful.
Back to top
View user's profile Send private message
brettlpb
Apprentice
Apprentice


Joined: 27 May 2003
Posts: 197

PostPosted: Sun Oct 05, 2003 1:58 am    Post subject: Reply with quote

Thanks for the guide, I'd love to be able to do this! :)

I set it all up like you said, and received no errors --- but when I print something - nothing happens at all.

In OpenOffice 1.1, when I go to Print, my printer is there now, but when I go to properties, the "Location:" spot is empty... what can I put here to point to my new samba printer?

Also, I use a Lexmark X73, which isn't the best for Linux printing... but I hope I can get this working or at least find out its just the printers problem :/

Brett
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Sun Oct 05, 2003 3:14 am    Post subject: Reply with quote

note to moderators: please place in Docs, Tips & Tricks forum

back on topic:

great howto!
_________________
while(true) {self.input(sugar);} :twisted:
Back to top
View user's profile Send private message
FourARSEDSheep
n00b
n00b


Joined: 12 Feb 2003
Posts: 45
Location: Norwich, England

PostPosted: Sun Oct 12, 2003 12:28 pm    Post subject: Reply with quote

no luck for me
im just really confused to be honest with you

i couldnt find the cups drivers for windows on the cups site.. so i was told to download adobe postscript drivers or something.. i downloaded those.. then i was told to copy some dll's and stuff from that exe to /usr/share/samba/drivers or something similar.. added my printer etc..

when i try and print it just says "processing..." and thats it
printer doesnt stir, and when i check the print jobs on my server it says nothing either

i dont wanna have to boot in to xp every time i wanna use my printer :?
Back to top
View user's profile Send private message
professorn
Apprentice
Apprentice


Joined: 18 Sep 2003
Posts: 235
Location: Stockholm, Sweden

PostPosted: Sun Oct 12, 2003 12:32 pm    Post subject: Reply with quote

Documentation, Tips & Trics?
Back to top
View user's profile Send private message
Glenn
n00b
n00b


Joined: 23 Jun 2003
Posts: 47
Location: Whenuapai, Auckland, New Zealand

PostPosted: Wed Nov 19, 2003 4:11 am    Post subject: Reply with quote

I apologise for neglecting this post, oh and posting it in the wrong forum.

There was another step which I did but thought was irrelevant to getting printng to cooperate. I found it in another thread.
Quote:
...then in '/usr/lib/cups/backend/' do this:
Code:

$ cd /usr/lib/cups/backend/
$ ln -s /usr/bin/smbspool smb

(found it in the cups docs, this enables the smb printing)


Quote:
In OpenOffice 1.1, when I go to Print, my printer is there now, but when I go to properties, the "Location:" spot is empty... what can I put here to point to my new samba printer?

The odd thing is that in my OO1.1, Location is the same as the name of my printer. ie Name: <thePrinter>, Location = thePrinter

I used the 1.19 drivers from ftp://ftp.easysw.com/pub/cups/1.1.19 which had a ./cups-samba.install script ot run. I then ran the #cupsaddsmb -v -a
I'm not entirely sure how well the new 1.2.20rc6 version works, but I know you have to compile it from source.

If I go to http://127.0.0.1:631/printers then this is what it says about my network windows printer:
Description: HP DeskJet 810C
Location: Downstairs
Printer State: idle, accepting jobs.
Device URI: smb://HOME/DOWNSTAIRS/Printer

Make sure your windows box can see you Linux by going to XP's My Network Places -> View workgroup computer -> Samba Server 3.0.0. After a username and passwork prompt I can see my home dir. This probably depends on the /etc/samba/conf entry though.
Back to top
View user's profile Send private message
mingotta
n00b
n00b


Joined: 11 Oct 2003
Posts: 52
Location: Roma, Italy

PostPosted: Sat Nov 22, 2003 12:14 am    Post subject: Reply with quote

Thanks man!
Thanks to your little howto I got my windows xp printer working from my gentoo box!
I got stuck on a problem for a little while though, which I'd like all to know:
Other windows xp clients on the lan can connect to the printer without any username/password and print.
But on Gentoo I HAD to add a username/password as an argument to the foomatic-configure command, otherwise printing the test-page would return me an error message like this: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
Is there a way to connect and print without sending username and password? Thanks!
Back to top
View user's profile Send private message
Glenn
n00b
n00b


Joined: 23 Jun 2003
Posts: 47
Location: Whenuapai, Auckland, New Zealand

PostPosted: Tue Dec 02, 2003 9:22 am    Post subject: Reply with quote

To avoid having to use your name and password you can create a printer that uses a guest account.

In your smb.conf make sure this line is uncommented:
Code:
guest account = pcguest


Now when you create a printer using foomatic type this instead:
Code:
#foomatic-configure -s cups -p HP-DeskJet_810C -c smb://guest:@HOME/DOWNSTAIRS/PRINTER -n thisIsATestPrinter -d hpijs


This is user = guest with password = 'nothing'
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Tue Dec 02, 2003 5:23 pm    Post subject: Reply with quote

you can do this without cups or samba also in NT/2K/XP. You can use the "Unix print services" in Windows, and share the printer with a simple name no spaces or crazy characters. You can then LPR to files to the print queue using the IP address or qualified host name as the server, and the printer share name as the queue name.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
Seather
Apprentice
Apprentice


Joined: 23 May 2003
Posts: 194
Location: South Africa

PostPosted: Tue Dec 02, 2003 8:20 pm    Post subject: Reply with quote

A little lost here, did everything (and I think it went okay), up to cupsaddsmb -v -a. This should be run on the linux box which I'll use to print to the windows box with the printer right?

When running it I get:

Code:

lucy cups # cupsaddsmb -v -a         
Password for root required to access localhost via SAMBA:


which is resulting in:

Code:

Domain=[SCYGRO] OS=[Unix] Server=[Samba 2.2.8a]
tree connect failed: NT_STATUS_WRONG_PASSWORD

ERROR: Unable to copy Windows printer driver files (256)!


Even after correctly typing in my root password.

Any ideas? *stumped*

Code:

lucy seather # cupsaddsmb -v -a
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%password' -c 'mkdir W32X86;put /var/spool/cups/tmp/3fcd082b095a3 W32X86/Canon.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
                               
Running command: rpcclient localhost -N -U'root%password' -c 'adddriver "Windows NT x86" "Canon:ADOBEPS5.DLL:Canon.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
result was WERR_BAD_PASSWORD   
                               
lucy seather # smbclient -U root //localhost/print$
Password:                       
smb: \> ls                     
  .                                   D        0  Wed Aug 20 12:42:34 2003
  ..                                  D        0  Tue Dec  2 22:56:07 2003
  W32X86                              D        0  Tue Dec  2 23:36:54 2003
  WIN40                               D        0  Wed Aug 20 12:42:34 2003
  W32ALPHA                            D        0  Wed Aug 20 12:42:34 2003
  W32MIPS                             D        0  Wed Aug 20 12:42:34 2003
  W32PPC                              D        0  Wed Aug 20 12:42:34 2003

                36975 blocks of size 1048576. 9700 blocks available
smb: \> lucy seather #
Back to top
View user's profile Send private message
AllTom
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2003
Posts: 147
Location: Wherever danger lies...

PostPosted: Mon Dec 08, 2003 11:22 am    Post subject: Reply with quote

Any response for Seather?
_________________
rtylershaw: "My computer doesn't even work and I love this distro. Weird."
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Mon Dec 08, 2003 6:52 pm    Post subject: Reply with quote

professorn wrote:
Documentation, Tips & Trics?


Yes
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Tue Dec 09, 2003 12:33 am    Post subject: Reply with quote

Shameless plug here :): Anyone interested in printing to Windows clients might also want to have a look at my guide on the whole CUPS+Samba printing topic: https://forums.gentoo.org/viewtopic.php?t=110931

Maybe you'll find some pointers there that will get you further if something doesn't work.
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Tue Dec 09, 2003 12:36 am    Post subject: Reply with quote

Seather: Do a
Code:

# smbpasswd -a root

so that the root user has an SMB account so that cupsaddsmb is able to authenticate when adding the printer drivers.
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
Seather
Apprentice
Apprentice


Joined: 23 May 2003
Posts: 194
Location: South Africa

PostPosted: Tue Dec 09, 2003 7:13 am    Post subject: Reply with quote

Even after doing:
Code:

smbpasswd -a root


I still get the following:

Code:

lucy samba # /etc/init.d/samba restart
 * Stopping samba...                                                                                                                                            [ ok ]
 * Starting samba...                                                                                                                                            [ ok ]
lucy samba # /etc/init.d/cupsd restart
 * Stopping cupsd...                                                                                                                                            [ ok ]
 * Starting cupsd...                                                                                                                                            [ ok ]
lucy samba # cupsaddsmb -v -a
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%password' -c 'mkdir W32X86;put /var/spool/cups/tmp/3fd5756c6f7b9 W32X86/Canon.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
                               
Running command: rpcclient localhost -N -U'root%password' -c 'adddriver "Windows NT x86" "Canon:ADOBEPS5.DLL:Canon.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
result was WERR_BAD_PASSWORD   
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Tue Dec 09, 2003 4:22 pm    Post subject: Reply with quote

Seather wrote:
Even after doing:
Code:

smbpasswd -a root


I still get the following:

Code:

lucy samba # /etc/init.d/samba restart
 * Stopping samba...                                                                                                                                            [ ok ]
 * Starting samba...                                                                                                                                            [ ok ]
lucy samba # /etc/init.d/cupsd restart
 * Stopping cupsd...                                                                                                                                            [ ok ]
 * Starting cupsd...                                                                                                                                            [ ok ]
lucy samba # cupsaddsmb -v -a
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%password' -c 'mkdir W32X86;put /var/spool/cups/tmp/3fd5756c6f7b9 W32X86/Canon.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
                               
Running command: rpcclient localhost -N -U'root%password' -c 'adddriver "Windows NT x86" "Canon:ADOBEPS5.DLL:Canon.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
result was WERR_BAD_PASSWORD   


I haven't really seen this error before, maybe it's something about permissions or already existing directories? Try deleting everything under the directory path you specified in the [printers] section in your smb.conf and run cupsaddsmb again. Also, are the ADOBE* files in the correct places (i.e. /usr/share/cups/drivers)?
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
njlg
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 98
Location: Portland, OR, USA

PostPosted: Wed Jan 21, 2004 2:58 am    Post subject: Reply with quote

(I'm not sure if this will get checked again)

I tried the above approach to printing to a Windows 98 machine (which I was hoping was some what similar). I got as far as running
Code:
#cupsaddsmb -v -a

which gave me a bunch of messages like
Quote:
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%' -c 'mkdir W32X86;put /var/spool/cups/tmp/400d751ea3277 W32X86/ThePrinter.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
Anonymous login successful
tree connect failed: NT_STATUS_ACCESS_DENIED

ERROR: Unable to copy Windows printer driver files (256)!

but from daff's howto I then ran
Code:
smbpasswd -a root

and got this
Quote:
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%' -c 'mkdir W32X86;put /var/spool/cups/tmp/400d7712d6ab5 W32X86/ThePrinter.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
/usr/share/cups/drivers/ADOBEPS5.DLL does not exist
/usr/share/cups/drivers/ADOBEPSU.DLL does not exist
/usr/share/cups/drivers/ADOBEPSU.HLP does not exist

ERROR: Unable to copy Windows printer driver files (256)!


Does anyone know what this means? Is it possible that this will not work with Windows 98 (I realize that it does not support that NT stuff)?

The funny thing is that I when I went to 127.0.0.1:631, I could print a test page from the printer. Which got the printer to act like it was printing, but no ink came out on the page.

EDIT: The printer seems to be out of ink. I'll post my results once I get more ink.
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Mon Feb 09, 2004 3:40 pm    Post subject: Reply with quote

Well since no one else has replied, I will :P

co je Jidda Sha Ti'l -- you are getting this b/c you haven't installed the windows drivers on your linux box yet for them to copy over. goto
http://cups.org/software.php?SOFTWARE=V1_1
now select the server closest to you, goto the windows directory and download cups-samba. I downloaded the first on 1.1.16. One you get run
Code:
tar -zxf cups-samba-1.1.16.tar.gz
on it and then go inside the folder it creates. Once there run
Code:
./configure
when that finishes run
Code:
make install


That will put the windows cups drivers where they need to go. Now when you run
Code:
cupsaddsmb -v -a
it will find the files it needs. (and be sure to do all of this as root :P)

**I had one more error, it couldn't find cups.hlp where it wanted it so I made a symbolic link to it
Code:
ln -s /usr/share/drivers/cups.hlp /usr/share/cups/drivers/cups.hlp
Back to top
View user's profile Send private message
Carbone14
n00b
n00b


Joined: 18 Feb 2004
Posts: 20
Location: Switzerland

PostPosted: Mon Mar 01, 2004 4:07 pm    Post subject: Reply with quote

Tanks for this howto, but I still have a little problem. When I try the cupsaddsmb command, it says the following :

Code:
bash-2.05b# cupsaddsmb -v -a
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%XXXX' -c 'mkdir W32X86;put /var/spool/cups/tmp/40436c6a5a37c W32X86/Yououou.ppd;put /usr/share/cups/drivers/cupsdrv5.dll W32X86/cupsdrv5.dll;put /usr/share/cups/drivers/cupsui5.dll W32X86/cupsui5.dll;put /usr/share/cups/drivers/cups5.hlp W32X86/cups5.hlp'
added interface ip=192.168.1.4 bcast=192.168.1.7 nmask=255.255.255.248
Domain=[MAISON] OS=[Unix] Server=[Samba 2.2.8a]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /var/spool/cups/tmp/40436c6a5a37c as \W32X86/Yououou.ppd (32556.5 kb/s) (average 32558.1 kb/s)
putting file /usr/share/cups/drivers/cupsdrv5.dll as \W32X86/cupsdrv5.dll (68423.1 kb/s) (average 56469.2 kb/s)
putting file /usr/share/cups/drivers/cupsui5.dll as \W32X86/cupsui5.dll (53597.3 kb/s) (average 55321.0 kb/s)
putting file /usr/share/cups/drivers/cups5.hlp as \W32X86/cups5.hlp (142340000.0 kb/s) (average 56711.0 kb/s)

Running command: rpcclient localhost -N -U'root%XXXX' -c 'adddriver "Windows NT x86" "Yououou:cupsdrv5.dll:Yououou.ppd:cupsui5.dll:cups5.hlp:NULL:RAW:NULL"'
cmd = adddriver "Windows NT x86" "Yououou:cupsdrv5.dll:Yououou.ppd:cupsui5.dll:cups5.hlp:NULL:RAW:NULL"
Printer Driver Yououou successfully installed.

Running command: rpcclient localhost -N -U'root%masterlinux' -c 'setdriver Yououou Yououou'
cmd = setdriver Yououou Yououou
result was NT_STATUS_UNSUCCESSFUL


No idea what this means...all I know is that I can't print...
I would highly appreciate some help...
Back to top
View user's profile Send private message
jodeman
n00b
n00b


Joined: 18 Feb 2004
Posts: 13

PostPosted: Wed Mar 10, 2004 3:09 pm    Post subject: Re: HOWTO: printing to winXP Reply with quote

Glenn wrote:
Next the cups drivers have to be downloaded and installed onto the winXP machine. http://cups.org/software.php will have these and the install script will stick them in the right place provided your smb.conf is set up right.
To install them to the winXP machine go:
Code:
#cupsaddsmb -v -a



I am having a little problem don't really knowing what to do with this one :). I did all the rest, I downloaded the file from the link you gave, but do I have to untar them, then type cupsaddsmb? I tried it without installing that tar, it failed.

Can someone please help, I'm a noob :).
Back to top
View user's profile Send private message
Glenn
n00b
n00b


Joined: 23 Jun 2003
Posts: 47
Location: Whenuapai, Auckland, New Zealand

PostPosted: Thu Mar 11, 2004 7:12 am    Post subject: Reply with quote

jodeman wrote:
I am having a little problem don't really knowing what to do with this one


From the download location go to the drop box and select CUPS Driver for Windows. Note that the other important files in that list were installed to your machine when you emerged cups.

There are some mirrors for the Windows drivers so just download one. When you extract the tarball you should see:
Code:
glenn@upstairs cups-samba-5.0rc3 $ ls
cups-samba.install  cups-samba.readme  cups-samba.ss
cups-samba.license  cups-samba.remove


And you should be able to install the drivers by going (as root)
Code:
# sh ./cups-samba.install


Then you can proceed with
Code:
#cupsaddsmb -v -a
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Thu Mar 11, 2004 2:44 pm    Post subject: Reply with quote

Carbone14 - make sure you have your samba config set up right. It sounds like you didn't set up access to you share correctly. If you need to post you conf and we can take a gander at it.
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
jodeman
n00b
n00b


Joined: 18 Feb 2004
Posts: 13

PostPosted: Thu Mar 11, 2004 5:50 pm    Post subject: Reply with quote

Thanks Glenn, it brought me a step closer for solving my problem,
I now get this error, don't actually know why... :?
Code:

Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%*****' -c 'mkdir W32X86;put /var/spool/cups/tmp/4050b4cc2d20d W32X86/OfficeJet.ppd;put /usr/share/cups/drivers/cupsdrv5.dll W32X86/cupsdrv5.dll;put /usr/share/cups/drivers/cupsui5.dll W32X86/cupsui5.dll;put /usr/share/cups/drivers/cups5.hlp W32X86/cups5.hlp'
session setup failed: NT_STATUS_LOGON_FAILURE

I gave in my root passw. but I get this...

Thanks for helping!

edit: Is smb fs needed for this???? I found it in kernel, this is a stupid question I guess? :roll:
Back to top
View user's profile Send private message
Glenn
n00b
n00b


Joined: 23 Jun 2003
Posts: 47
Location: Whenuapai, Auckland, New Zealand

PostPosted: Fri Mar 12, 2004 8:58 am    Post subject: Reply with quote

I have a feeling that the samba program deals with installing the files to the windows machine. Perhaps you have to make sure that your c: is shared.

I don't think it's necessary to have smb-fs built into the kernel but I find it useful for playing the mp3s from the machine downstairs. Just straying off topic a bit, if you choose to use it, just add something like this to /etc/fstab
Code:
//DOWNSTAIRS/APPLICATIONS\040(E)   /mnt/apps_e   smbfs   credentials=/etc/server.credentials,rw,umask=000


where \040 represents a space. For example windows reads my e: as "APPLICATIONS (E)"
Back to top
View user's profile Send private message
Carbone14
n00b
n00b


Joined: 18 Feb 2004
Posts: 20
Location: Switzerland

PostPosted: Tue Mar 16, 2004 3:44 pm    Post subject: Reply with quote

Here is my smb.conf file. What do you think is missing for the printer to work ?

Code:
# $Header: /home/cvsroot/gentoo-x86/net-fs/samba/files/smb.conf.example,v 1.3 2002/08/27 20:39:48 woodchip Exp $
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

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

# 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 Server %v

# Message command is run by samba when a "popup" message is sent to it.
# The example below is for use with LinPopUp:
; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s

# 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 = lpstat
#   load printers = yes
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

# Samba 2.2 supports the Windows NT-style point-and-print feature. To
# use this, you need to be able to upload print drivers to the samba
# server. The printer admins (or root) may install drivers onto samba.
# Note that this feature uses the print$ share, so you will need to
# enable it below.
# This parameter works like domain admin group:
# printer admin = @<group> <user>
;   printer admin = @adm

# 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.1. 192.168.2. 127.

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

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = user
# 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
  smb passwd file = /etc/samba/private/smbpasswd

# 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
;  passwd program = /usr/bin/passwd %u
;  passwd chat = *New*UNIX*password* %n\n *ReType*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. winbind uid and winbind gid are the only required parameters.
#
# winbind uid is the range of uid's winbind can use when mapping RIDs to uid's
;  winbind uid = 10000-20000
#
# winbind gid is the range of uid's winbind can use when mapping RIDs to gid's
;  winbind gid = 10000-20000
#
# winbind separator is the character a user must use between their domain
# name and username, defaults to "\"
;  winbind separator = +
#
# 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
#
# 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 by the domain
# controller to add local machine accounts when adding machines to the domain.
# The script must work from the command line when replacing the macros,
# or the operation will fail. Check that groups exist if forcing a group.
# Script for domain controller for adding machines:
; add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
# Script for domain member for adding local accounts for authenticated users:
; add user script = /usr/sbin/useradd -s /bin/false %u

# Domain groups:
# domain admin group is a list of unix users or groups who are made members
# of the Domain Admin group
; domain admin group = root @wheel
#
# domain guest groups is a list of unix users or groups who are made members
# of the Domain Guests group
; domain guest group = nobody @guest

# 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 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 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian),
# 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul),
# 950 (Trad. Chin.).
# 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:
;   client code page = 850
;   character set = ISO8859-1


#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /var/lib/samba/netlogon
;   guest ok = yes
;   writable = no

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /var/lib/samba/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients. On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you have
# to swap the 'print command' line below with the commented one.
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# to allow user 'guest account' to print.
   public = yes 
   guest ok = yes
   writable = no
   printable = yes
   printer admin = root
   create mode = 0700
# =====================================
# print command: see above for details.
# =====================================
   print command = lpr -P %p -o raw %s -r   # using client side printer drivers.
;   print command = lpr -P %p %s # using cups own drivers (use generic PostScript on clients).
# The following two commands are the samba defaults for printing=cups
# change them only if you need different options:
;   lpq command = lpq -P %p
;   lprm command = cancel %p-%j

# This share is used for Windows NT-style point-and-print support.
# To be able to install drivers, you need to be either root, or listed
# in the printer admin parameter above. Note that you also need write access
# to the directory and share definition to be able to upload the drivers.
# For more information on this, please see the Printing Support Section of
# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
[print$]
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   write list = @adm root

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba/public
;   public = yes
;   writable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by Fred. Spool data will be placed in Fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by Fred. Note that Fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %u option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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