View previous topic :: View next topic |
Author |
Message |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Sat Jan 18, 2003 8:41 pm Post subject: Starting over with Samba |
|
|
I can't get it working, so I've emerge unmerged samba. I'm emerging it again right now, along with cups, foomatic, gimp-print, and qtcups.
My plan is to get samba working, of course, then make my gentoo box be able to print through my windows XP box.
I'm going to try to use this thread as a log of what I'm doing, and any problems I encounter. Feel free to add any suggestions.
On a side note, I've realized why Linux isn't very popular. Too many programs that don't seem to have a common way of doing things. I will still try to trudge through it though.
Is there any good threads that I missed while searching that discuss how to go about getting the most recent version of Samba working with Gentoo? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
PT_LAmb Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/6486271863e5954693c482.gif)
Joined: 22 Apr 2002 Posts: 332 Location: Lisboa (Lisbon), Portugal
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Sat Jan 18, 2003 9:04 pm Post subject: |
|
|
now that I've started over, the first problem I'm running into is setting a user/password with smbpasswd. It says command not found. Now what?
I realize that the first step was making a smb.conf file in my /etc directory, and the 2nd step is setting up this account access. Am I correct? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
Posted: Sun Jan 19, 2003 2:14 am Post subject: |
|
|
Code: |
emerge -s net-fs/samba
|
to see if samba is properly installed
as root start samba:
Code: |
/etc/init.d/samba start
|
to see if things are working properly on your end:
Code: |
smbclient -L localhostname -N
|
to see if you can access your XP machine:
Code: |
smbclient -L winXPhostname -U username
password
|
if you did not set a password for the user(on the XP machine) add -N for convenience
the username has to exist on your XP machine |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BlackBart Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/0c528c703e0b714434267.jpg)
Joined: 07 Oct 2002 Posts: 252
|
Posted: Sun Jan 19, 2003 6:20 am Post subject: |
|
|
brkdnr wrote: | now that I've started over, the first problem I'm running into is setting a user/password with smbpasswd. It says command not found. Now what?
I realize that the first step was making a smb.conf file in my /etc directory, and the 2nd step is setting up this account access. Am I correct? |
If you want to add a password to the samba password file (so you can accesss the share from the xp machine) run
Code: |
smbpasswd USERNAME -a
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Sun Jan 19, 2003 9:56 am Post subject: |
|
|
oddly, I did an
Code: | emerge net-fs/samba |
and then followed the commands listed above, and I have full SMB access to and from my windows XP machine. I am able to locate my printer on my windows machine, and configuration through the KDE Control Center seems to be fine, until I need to acually print something.
When printing anything, either the test page or from OpenOffice, the job goes to the spooler on my Gentoo box, but never get's to the printer on the XP machine.
What now? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
PT_LAmb Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/6486271863e5954693c482.gif)
Joined: 22 Apr 2002 Posts: 332 Location: Lisboa (Lisbon), Portugal
|
Posted: Sun Jan 19, 2003 7:00 pm Post subject: |
|
|
brkdnr wrote: | I realize that the first step was making a smb.conf file in my /etc directory, and the 2nd step is setting up this account access. Am I correct? |
And one last thing, it's not /etc/smb.conf, but /etc/samba/smb.conf
Good luck,
Ricardo Cordeiro ![Smile :)](images/smiles/icon_smile.gif) _________________ SETI@Home - http://setiathome.ssl.berkeley.edu/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Sun Jan 19, 2003 7:58 pm Post subject: |
|
|
First, my printer is an Epson Stylus C80. I've printed with it from linux previously, but on a direct USB cable. I have the printer drivers installed, and am able to set options on the driver, but not get any output.
this link:
http://mumford1.dyndns.org/~bs7452/linuxhelp/cups.html
seems to show me that I need to set up my system to send printer stuff to the smb print spooler.
The notes from that link don't work for me, here they are:
Code: | as root from an xterm, type the following:
ln -s `which smbspool` /usr/lib/cups/backend/smb
this will link the program "smbspool" to the cups directory for the samba backend
restart cups with "/etc/init.d/cupsys restart" |
the ln -s command gives me an error message of:
Code: | ln:'/usr/lib/cups/backend/smb': File Exists |
then after the restart command, i get:
Code: | No such file or directory |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
Posted: Mon Jan 20, 2003 2:45 am Post subject: |
|
|
Fist things first I have trouble myself setting things up right but in my case I guess it has to do with the fact that my printer is rather badly supported.Yours should work.
OK first the stuff you tried:
Code: | ls -l /usr/lib/cups/backend/smb |
should show you:
Code: |
/usr/lib/cups/backend/smb -> /usr/bin/smbspool
|
So it is already set.
/etc/init.d/cupsys does not exist
but if you look into /etc/init.d/ you will see that
/etc/init.d/cupd does exist.
The doc is for debian so be a little more flexible...
OK lets start over with the printing stuff, I presume you read:
http://www.gentoo.org/doc/en/printing-howto.xml
Iguess you have cups,gimp-print and the foomatic stuff installed then, if not do so now.
before we start make shure cupsd and samba are running.
cd into /etc/init.d and try to start the things by doing:
Code: |
./cupsd start
./samba start
|
if it tells you that the services are already running you can start if not they should be started now and you can start anyway.
You do not realy need the foomatic thing it just adds a printer to cups you could set it in the cups webinterface yourself but lets use it anyway.
foomatic needs the cupsd running to work properly.
Code: |
foomatic-configure -s cups -p Epson-Stylus_C80 -c smb://user:password@server/share -n queue_name -d gimp-print
|
que_name is just the name you want to give it, it can be anything.
check http://localhost:631/printers
if you see it.
If you do you should be set.
Just to be on the save side check your /etc/samba/smb.conf for:
Follow the printing guide for the rest.
http://www.gentoo.org/doc/en/printing-howto.xml
Please tell me if it works. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Mon Jan 20, 2003 5:42 am Post subject: |
|
|
I followed your tips, and then tried printing. No luck. I tried restarting samba and cupsd, which they did fine. test page still does not print, either does printing a page from Open office.
/etc/samba/smb.conf does have printing=cups.
I'm able to see a printer and it's jobs when connecting to port 631, but the jobs never get processed.
Thanks for your help so far! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
Posted: Mon Jan 20, 2003 12:54 pm Post subject: |
|
|
You know something very strage just happend.
I wanted to try stuff with my printer setup again and now it just works I am pretty shure I did the same as before when I could not get it to work...
Very strange indeed.
I just deleted all the printers that where in cups and tryed to readd my printer and now it works, before the printer did something too but it would not print just make a lot of noise forever and only power off would reset it...
I did not reemerge anything.
My printer is a Canon S520 and I used this line to add it:
Code: | foomatic-configure -s cups -p Canon-S500 -c smb://HEIKO/CANONS520 -n CANONS520 -d gimp-print |
HEIKO is my fathers computer hostname CANONS520 is the printer share...
Ok I remember now that I changed the paper size from "Letter" to "A4" (this is the only difference to before)but that was all.
And your printer does not do anything? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
green sun Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/404567313dc676168338d.jpg)
Joined: 04 Nov 2002 Posts: 325 Location: Wista, MA
|
Posted: Mon Jan 20, 2003 2:39 pm Post subject: Just FYI |
|
|
O'Reilly has their "Using Samba" book online as part of their OpenBooks project.
http://www.oreilly.com/catalog/samba/chapter/book/index.html
I found this extremely useful in setting up Samba (as domain controller & file server), esp. the conf file reference at the end. Great stuff on security & performance as well. You may want to look at the chapter on printing.
Openbooks page found here:
http://www.oreilly.com/openbook/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
Posted: Mon Jan 20, 2003 5:03 pm Post subject: |
|
|
That may be but I do not think that samba is the problem in this case...
And you have to subscribe to view the relevant parts of the book.
Samba seems to work just fine for file services and there is no reason why it should not work for printing if the other stuff works...
You would have to configure samba if it was the printserver but in this case it is the client, as far as I am aware it does not require special configuration for that.
brkdnr are you shure your windows machine is set up properly?all the proper right and stuff? Is the printer turned on and connected to the computer?
ok lets see I have another idea:
delete all printers in cups
restart cups: Code: | /etc/init.d/cupsd restart |
delete all files in
readd printer with foomatic you know how
try to print
look in the logfiles for usefull info
Code: |
cd /var/log/cups/
cat error_log
|
you could also look into the cups config files in /etc/cups if you fin any errors especialy in printers.conf
do you have QT installed?
I read that cups needs it without realy needing it...
Anyway I think it would not hurt to install it.
reemerge cups if you do... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Tue Jan 21, 2003 5:50 am Post subject: |
|
|
a copy of my /var/cups/error_log is:
E [20/Jan/2003:23:39:31 -0600] [Job 11] SMB tree connect failed: NT_STATUS_ACCESS_DENIED
E [20/Jan/2003:23:39:31 -0600] [Job 11] Unable to connect to SAMBA host, will retry in 60 seconds...: Success
In fact, there are a TON of these. I checked my XP machine, I unshared and reshared the printer. I made sure my firewall (kerio) was disabled.
I just did an emerge of qt then cups. prior to that error log. I am still able to browse via samba my XP box from my linux box.
This is seriously annoying! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
green sun Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/404567313dc676168338d.jpg)
Joined: 04 Nov 2002 Posts: 325 Location: Wista, MA
|
Posted: Thu Jan 23, 2003 2:10 am Post subject: Clarification... |
|
|
1. You don't need to subscribe to Safari to view the Samba book
http://www.oreilly.com/catalog/samba/chapter/book/index.html
Not that I think it will be a ton of help on this tho...
2. Sounds like samba is passing the wrong username/password to the print share. Is the printer set up on XP with "Anybody" "Full Access"? You may want to bump up the debug level in samba & see if anything useful shows up in the logs... In smb.conf add:
Code: |
[global]
debug level = number
|
(Umm.. add it in the [global] section). Increase it one number at a time.. 3 and above will slow your system, so just do it for debugging...
Also, are you using smbspool to do this? I was a little confused on the command you were issuing... if so, you can pass a username/password in the URI to smbspool...just do
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Thu Jan 23, 2003 7:08 am Post subject: |
|
|
i read smbspool --help, and well...it didn't help. What command would I use is my printer is Epson, my xp server is Server, and my user is User, and my password is Password and my workgroup is Workgroup? I typed in
Code: | User:Password@Workgroups/Server/Epson |
but it just tells me what the usage is, not what I didn't type in right or if it even worked. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sburnett Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 10 Jun 2002 Posts: 79 Location: USA
|
Posted: Fri Jan 24, 2003 12:46 am Post subject: |
|
|
I believe you need // in front of the username/password/etc. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
brkdnr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 02 Jan 2003 Posts: 15
|
Posted: Fri Jan 24, 2003 4:40 am Post subject: |
|
|
This is getting rediculous. Can someone tell me if I'm doing something wrong, if it's shoddy documentation on samba, or shoddy documentation on cups?
So far, I have emerged samba, qt, cups, cups-gimp-print, foomatic.
I'm not getting any real error messages. All I'm seeing is that for some reason I can start a print job and cups seems to be set up correctly, but the print job won't make it to the windows XP box. I have followed every direction, and found a lot of help when I did a quick seach for smbspool, but nothing I try seems to work.
I'm going to go kill some aliens with some online games for a bit, maybe I will check back in a few hours to see if anyone else has an idea of what might be wrong. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nouse66 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/2200274643f0b9a441d6bc.png)
Joined: 09 Jan 2003 Posts: 194
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Spacemage n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Jan 2003 Posts: 26 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|