Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Starting over with Samba
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
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Sat Jan 18, 2003 8:41 pm    Post subject: Starting over with Samba Reply with quote

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
View user's profile Send private message
PT_LAmb
Guru
Guru


Joined: 22 Apr 2002
Posts: 332
Location: Lisboa (Lisbon), Portugal

PostPosted: Sat Jan 18, 2003 9:01 pm    Post subject: Reply with quote

What's not working?
_________________
SETI@Home - http://setiathome.ssl.berkeley.edu/
Back to top
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Sat Jan 18, 2003 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Sun Jan 19, 2003 2:14 am    Post subject: Reply with quote

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
View user's profile Send private message
BlackBart
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 252

PostPosted: Sun Jan 19, 2003 6:20 am    Post subject: Reply with quote

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
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Sun Jan 19, 2003 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Sun Jan 19, 2003 1:48 pm    Post subject: Reply with quote

you may want to have a look at these threads:
https://forums.gentoo.org/viewtopic.php?t=1790
https://forums.gentoo.org/viewtopic.php?t=29972
https://forums.gentoo.org/viewtopic.php?t=14714
and of course the forum search

Your problem is most likely not related to samba it seems to work just fine.
also check http://www.linuxprinting.org to see if your printer is supported by linux
BTW wich printer do you have?
Back to top
View user's profile Send private message
PT_LAmb
Guru
Guru


Joined: 22 Apr 2002
Posts: 332
Location: Lisboa (Lisbon), Portugal

PostPosted: Sun Jan 19, 2003 7:00 pm    Post subject: Reply with quote

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 :)
_________________
SETI@Home - http://setiathome.ssl.berkeley.edu/
Back to top
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Sun Jan 19, 2003 7:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Mon Jan 20, 2003 2:45 am    Post subject: Reply with quote

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. :wink:

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:
Code:
printing = cups

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
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Mon Jan 20, 2003 5:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Mon Jan 20, 2003 9:33 am    Post subject: Reply with quote

OK found some interresting stuff here:
https://forums.gentoo.org/viewtopic.php?t=29972
https://forums.gentoo.org/viewtopic.php?t=30024

Read both threads.
Check if something is queued if it is delete it.
try printing again.
if that does not help try:
Code:
emerge rsync && emerge -C cups && emerge qt cups

to reemerge cups
I am running out of ideas here... :(
Back to top
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Mon Jan 20, 2003 12:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
green sun
Guru
Guru


Joined: 04 Nov 2002
Posts: 325
Location: Wista, MA

PostPosted: Mon Jan 20, 2003 2:39 pm    Post subject: Just FYI Reply with quote

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
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Mon Jan 20, 2003 5:03 pm    Post subject: Reply with quote

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
Code:
rm /var/log/cups/*

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
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Tue Jan 21, 2003 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message
green sun
Guru
Guru


Joined: 04 Nov 2002
Posts: 325
Location: Wista, MA

PostPosted: Thu Jan 23, 2003 2:10 am    Post subject: Clarification... Reply with quote

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
Code:

smbspool --help
Back to top
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Thu Jan 23, 2003 7:08 am    Post subject: Reply with quote

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
View user's profile Send private message
sburnett
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jun 2002
Posts: 79
Location: USA

PostPosted: Fri Jan 24, 2003 12:46 am    Post subject: Reply with quote

I believe you need // in front of the username/password/etc.
Back to top
View user's profile Send private message
brkdnr
n00b
n00b


Joined: 02 Jan 2003
Posts: 15

PostPosted: Fri Jan 24, 2003 4:40 am    Post subject: Reply with quote

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
View user's profile Send private message
nouse66
Apprentice
Apprentice


Joined: 09 Jan 2003
Posts: 194

PostPosted: Wed Jan 29, 2003 9:49 am    Post subject: Reply with quote

i had that same access error trying to print to a windows 2000 machine. turned out that i didnt need the password in the printer path. cups works for me using this:
smb://myusername@windowsmachinename/printername
in otherwords:
smb://aaron@nash/epson

hope that helps...
Back to top
View user's profile Send private message
Spacemage
n00b
n00b


Joined: 13 Jan 2003
Posts: 26
Location: Germany

PostPosted: Mon Feb 03, 2003 3:33 pm    Post subject: Reply with quote

I just read this one:
https://forums.gentoo.org/viewtopic.php?t=32816
Quote:
Made my entry in my /etc/hosts match the win98 machines name.

Might be a solution to your problem...
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