Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: dwater on January 12, 2005, 10:02:05 AM
-
Can someone advise me on how best to get help and advice on upgrading samba to version 3?
Thanks.
Max.
-
Hi Max
I would use those from the Contribs/download area:
gzartman/Beta/Samba3
Very nice work. Thanks to the author. It's beta and we are using it only on our own server yet but it seems to be very stable.
Michael
-
Hi Max
I would use those from the Contribs/download area:
gzartman/Beta/Samba3
Very nice work. Thanks to the author. It's beta and we are using it only on our own server yet but it seems to be very stable.
Michael
The instructions are :
Install/Upgrade Instructions:
1. Download all rpms to local machine.
2. RPM -Uvh *.rpm
3. perl /etc/e-smith/events/actions/initialize-default-databases
4. /sbin/e-smith/signal-event ibay-modify
5. perl /etc/e-smith/events/actions/group-modify-samba all
Was it really that simple?
Does it convert all the current ibays and profiles?
What about the panels on the server manager - I have the advanced workgroup contrib - will that work?
Just want to know what I'm getting into before I start - if I have to allow a long time to sort things out, I'll start on Friday night, giving me Sat and Sun before people need to use it again.
Thanks.
Max.
-
I cannot remember all but yes, it was easy.
Does it convert all the current ibays and profiles?
Yes
What about the panels on the server manager - I have the advanced workgroup contrib - will that work?
I uninstalled advanced workgroup panel before and I expected impacts so I do not use it's current version with Samba 3.
Just want to know what I'm getting into before I start - if I have to allow a long time to sort things out, I'll start on Friday night, giving me Sat and Sun before people need to use it again.
If you do not have a separate test system for this to try out, I myself would use a Friday for such significant changes.
Michael
-
If you do not have a separate test system for this to try out, I myself would use a Friday for such significant changes.
OK, I did it.
Version 3.0.7-1.2sme01
Mostly seems fine, except I lost all my printers. I am using CUPS and they are still OK on the CUPS web page, but SAMBA isn't advertising them.
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = yes
printable = yes
The 'printers' page of the server-manager says the lists are 'in sycn'.
Also, I get an error message :
Jan 14 18:23:37 truth e-smith[3041]: Skipping unknown event handler: /etc/e-smith/events/printer-sync/S90reload-samba
and, investigating :
[mwaterman@truth printer-create]# ls -l /etc/e-smith/events/printer-sync/S90reload-samba
lrwxrwxrwx 1 root root 23 Dec 30 09:08 /etc/e-smith/events/printer-sync/S90reload-samba -> ../actions/reload-samba
[mwaterman@truth printer-create]# ls -lL !$
ls -lL /etc/e-smith/events/printer-sync/S90reload-samba
ls: /etc/e-smith/events/printer-sync/S90reload-samba: No such file or directory
[mwaterman@truth printer-create]#
Maybe that is related...
Hrm...I relinked that with ../actions/restart-samba :
[mwaterman@truth printer-sync]# rm S90reload-samba
rm: remove S90reload-samba'? y
[mwaterman@truth printer-sync]# ln -s ../actions/restart-samba !$
ln -s ../actions/restart-samba S90reload-samba
and that seemed to fix the error message. Actually, looking at /var/log/messages, it seemed I got that before upgrading too, so perhaps it is not related.
Can someone help me get my printers back?
Max.
-
hrm, I also find error messages such as these :
[2005/01/14 17:45:17, 0] nmbd/nmbd.c:main(665) Netbios nameserver version 3.0.7-1.2sme01 started. Copyright Andrew Tridgell and the Samba Team 1994-2004[2005/01/14 17:45:17, 0] lib/pidfile.c:pidfile_create(90) ERROR: nmbd is already running. File /var/run/nmbd.pid exists and process id 3225 is running.
[2005/01/14 17:59:20, 0] printing/pcap.c:pcap_printer_fn(361)
Unable to open printcap file lpstat for read!
I'm not sure where printing/pcap.c is.
Any advice anyone?
Max.
-
The reload-samba action was provided by earlier versions of e-smith-samba. If
the new version no longer provides this action, you could ask the maintainer to
re-include it, perhaps as a symlink to restart-samba. Not providing the
reload-samba action breaks compatibility with stuff that depends on it, as you
have noticed. Meanwhile I, as the maintainer of e-smith-cups, will change the
symlink target from reload-samba to restart-samba. Thanks for spotting this.
Regarding the error in your smbd error log: what does the command 'lpstat -a'
return when you run it from the command prompt?
-
...If
the new version no longer provides this action, you could ask the maintainer to
re-include it...
I would feel a little out of my depth, I think. I cannot figure out how to contact him. How do I find his email address?
Regarding the error in your smbd error log: what does the command 'lpstat -a'
return when you run it from the command prompt?
I am no longer near the machine, but I did run an 'lpstat -t' and it looked normal - not that I looked closely. There were certainly several printers listed.
-
Next time you're near that machine, could you scan your smb.conf file for any printing related lines and post them here?
-
I'll contact the maintainer of the version of e-smith-samba that you're using. FYI you can get his address with 'rpm -q --changelog e-smith-samba'.
-
Next time you're near that machine, could you scan your smb.conf file for any printing related lines and post them here?
I thought of that one before I left :) I took a copy of it and all the log samba log files...although isn't what I quoted above all the relevant lines?
In any case, here is what I grabbed :
http://reality.sgiweb.org/maxw/tmp/samba-debug/
Log files and the conf file.
Let me know if you spot anything.
Thanks!
Max.
-
Hmmm... I don't have permission to access the files in that http directory. What you posted before are almost all relevant lines, but it's missing the lines from the global section.
-
Hmmm... I don't have permission...
OK, sorry about that. Please try again.
Also, the reason I upgraded to samba 3 was to fix the problem with using chinese characters in filenames. The behaviour hadn't changed after the upgrade. Could you comment on any lines that are wrong wrt that problem?
Thanks!
Max.
-
Chinese characters in Samba is already being discussed in another topic on this forum. Let's not discuss that here (although it seems like you need to change the client code page in your smb.conf).
Regarding the printing related directives, I couldn't find anything wrong with the ones you specified in your smb.conf. Now let's have a look at the default values: could you post the output of 'testparm -s' please?
-
... could you post the output of 'testparm -s' please?
OK, I put it here :
http://reality.sgiweb.org/maxw/tmp/samba-debug/testparm.txt
thanks!
Max.
-
Hmmm... that's interesting. Samba is using what appear to be correct defaults for "printing = cups", including "printcap name = lpstat", but from your smbd error log it looks like the defaults don't work. Are you absolutely sure that the command 'lpstat -v' works from the shell prompt and doesn't ask you for a password or anything?
As a workaround, you could add the line "printcap name = /etc/printcap" to the global section in smb.conf, then reload samba and post the results here, please.
-
An update about the other CUPS-related problem you reported: I've contacted Greg Zartman, the maintainer of e-smith-samba-2.*, and he has kindly put the reload-samba action back into e-smith-samba. Therefore and contrary to what I wrote before, I will _not_ change the symlink target in the printer-sync event (in e-smith-cups) from reload-samba to restart-samba. If you use samba-3 with e-smith-samba-2 and find that samba doesn't reload in printer-sync, you should update your e-smith-samba-2 package. This only applies to people who use Samba3/e-smith-samba-2 with CUPS/e-smith-cups.
-
...Are you absolutely sure that the command 'lpstat -v' works from the shell prompt and doesn't ask you for a password or anything?...
device for HP1120C: socket://hp-jd500x:9100/
device for HP2100-Corp: socket://hp-jd500X:9101/
device for philly: socket://philly:9100/
device for ricardo: socket://ricardo:9100/
Looks normal to me :|
Max.
-
One thing I am noticing, is when I do a /etc/init.d/smb restart, I sometimes have the '[OK]' missing on the 'Starting SMB services' line. A 'ps -aux' shows that smb has been running for a few days - so the restart didn't happen.
/etc/init.d/smb restart
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Starting SMB services:
Starting NMB services: [ OK ]
[mwaterman@truth samba]# ps -aux | fgrep smb
root 330 0.0 0.0 1284 272 ? S Jan14 0:00 supervise smbd
root 2814 0.0 0.0 7232 1012 ? S Jan14 0:00 smbd -D
root 11585 0.6 0.1 7100 2388 ? S 07:57 0:00 /usr/sbin/smbd -F
root 11592 0.0 0.1 7100 2412 ? S 07:57 0:00 /usr/sbin/smbd -F
5004 11606 6.1 0.2 7812 3676 ? S 07:57 0:00 /usr/sbin/smbd -F
root 11608 0.0 0.0 1684 560 pts/0 R 07:58 0:00 grep -F smb
However, it is currently looking OK (?) :
# ps -aux | fgrep smb
root 330 0.0 0.0 1284 276 ? S Jan14 0:00 supervise smbd
root 11893 2.0 0.1 7100 2388 ? S 08:00 0:00 /usr/sbin/smbd -F
root 11896 0.0 0.1 7100 2412 ? S 08:00 0:00 /usr/sbin/smbd -F
root 11917 0.0 0.0 1680 548 pts/0 R 08:00 0:00 grep -F smb
but still, there are no printers advertised.
I see this too :
[2005/01/17 08:00:23, 0] printing/pcap.c:pcap_printer_fn(361)
Unable to open printcap file lpstat for read!
Any ideas?
Max.
-
another data point; this works fine :
# cat /etc/passwd | lp -d ricardo
request id is ricardo-252 (1 file(s))
but I cannot add a printer to an XP client either by specifying "\\truth\ricardo", or by browsing.
-
Could you please do the following:
1. Update your e-smith-samba-2 package to the latest released version (the one that has the reload-samba action back in).
2. Point /etc/e-smith/events/printer-sync/S90reload-samba back at reload-samba (instead of restart-samba, what you changed it to).
3. Add the line "printcap name = /etc/printcap" to the global section of your smb.conf.
4. Issue the command "/sbin/e-smith/signal-event printer-sync".
Let me know whether or not:
1. smbd actually got reloaded? The smbd log should tell you.
2. Your printers are now visible to samba clients?
-
Could you please do the following:
1. Update your e-smith-samba-2 package to the latest released version (the one that has the reload-samba action back in).
# rpm -q e-smith-samba
e-smith-samba-2.1.0-10gjz
2. Point /etc/e-smith/events/printer-sync/S90reload-samba back at reload-samba (instead of restart-samba, what you changed it to).
# ls -l /etc/e-smith/events/printer-sync/S90reload-samba
lrwxrwxrwx 1 root root 23 Jan 18 10:11 /etc/e-smith/events/printer-sync/S90reload-samba -> ../actions/reload-samba
3. Add the line "printcap name = /etc/printcap" to the global section of your smb.conf.
# cat /etc/e-smith/templates{,-custom}/etc/smb.conf/11printcapName
printcap name = /etc/printcap
# egrep '^\[|printcap' /etc/smb.conf
[global]
printcap name = /etc/printcap
[homes]
...
4. Issue the command "/sbin/e-smith/signal-event printer-sync".
Ok, it seemed to take a a while (30 seconds?), but it complete w/o any messages.
Let me know whether or not:
1. smbd actually got reloaded? The smbd log should tell you.
This is strange; I seem to have two sets of log files - /var/log/samba/smbd.log and /var/log/samba/log.smbd. Same for nmbd.
In any case, neither of them have been changed since I rebooted earlier this morning (still complaining about the printcap file).
In the /var/log/messages file, I see :
Jan 18 10:24:50 truth e-smith[3819]: Running event handler: /etc/e-smith/events/printer-sync/S90reload-samba
Jan 18 10:24:51 truth kernel: NET4: AppleTalk 0.18a for Linux NET4.0
Jan 18 10:24:51 truth atalkd[3887]: restart (1.5.5)
Jan 18 10:24:51 truth e-smith[3819]: S90reload-samba=action|Event|printer-sync|Action|S90reload-samba|Start|1106015090 990943|End|1106015091 450907|Elapsed|0.459964
Jan 18 10:24:51 truth e-smith[3819]: Running event handler: /etc/e-smith/events/printer-sync/S95cups-symlink-ppds
Jan 18 10:24:51 truth e-smith[3819]: S95cups-symlink-ppds=action|Event|printer-sync|Action|S95cups-symlink-ppds|Start|1106015091 451133|End|1106015091 475560|Elapsed|0.024427
Jan 18 10:24:51 truth e-smith[3819]: Running event handler: /etc/e-smith/events/printer-sync/S95cups-update-timestamp
Jan 18 10:24:51 truth /etc/e-smith/events/printer-sync/S95cups-update-timestamp[3902]: /home/e-smith/configuration: OLD cups=service|LastSync|1105922275|status|enabled Jan 18 10:24:51 truth /etc/e-smith/events/printer-sync/S95cups-update-timestamp[3902]: /home/e-smith/configuration: NEW cups=service|LastSync|1106015091|status|enabled Jan 18 10:24:51 truth e-smith[3819]: S95cups-update-timestamp=action|Event|printer-sync|Action|S95cups-update-timestamp|Start|1106015091 475776|End|1106015091 756484|Elapsed|0.280708
2. Your printers are now visible to samba clients?
'fraid not :( Same as before - the shares are there, but not the printers.
-
Have you tried a full samba restart? Kill anything samba-related for good measure first, then do "/etc/e-smith/events/actions/restart-samba".
BTW, what's the output of "testparm -s |grep printcap"?
Did printer-sync produce a printcap file that looks OK to you?
-
Have you tried a full samba restart? Kill anything samba-related for good measure first, then do "/etc/e-smith/events/actions/restart-samba".
I tried a reboot. That's should do what you suggest, I think.
When I try to (on XP) 'start/run \\truth\philly', it reports 'the network path was not found \\truth\philly'.
BTW, what's the output of "testparm -s |grep printcap"?
printcap name = lpstat
Does that make sense? I don't know anything about printcap...though I note that on my FC3 system (at home), it says 'printcap name = /etc/printcap', so that is a difference...
Did printer-sync produce a printcap file that looks OK to you?
I don't know what it should look like :-?
Ah, but I have an FC3 box right here, and they look similar. This is the SME one :
HP1120C:rm=truth:rp=HP1120C:
HP2100-Corp:rm=truth:rp=HP2100-Corp:
philly:rm=truth:rp=philly:
ricardo:rm=truth:rp=ricardo:
Thanks!
Max.
-
Looking at the defaults used for your samba configuration, I'm pretty sure that your smbd was not compiled against libcups, but just to make sure, can you confirm that "ldd /usr/sbin/smbd |grep cups" returns nothing?
If your /etc/smb.conf still has the line "printcap name = /etc/printcap" but testparm reports "printcap name = lpstat", then something must be wrong with samba. It's starting to look like samba has trouble setting and using correct values for "printing = cups". Since cups has SysV and BSD frontends, you could try the following workaround:
1. Keep the template fragment that sets "printcap name = /etc/printcap"
2. Change the template fragment that sets the "printing" parameter from "printing = cups" to "printing = sysv"
3. Expand the template for /etc/smb.conf
4. Get the output of "testparm -s" and post it, please.
5. /etc/e-smith/events/actions/reload-samba
-
Looking at the defaults used for your samba configuration, I'm pretty sure that your smbd was not compiled against libcups, but just to make sure, can you confirm that "ldd /usr/sbin/smbd |grep cups" returns nothing?
# ldd /usr/sbin/smbd |grep cups
#
If your /etc/smb.conf still has the line "printcap name = /etc/printcap"
# fgrep printcap /etc/smb.conf
printcap name = /etc/printcap
but testparm reports "printcap name = lpstat",
# testparm -s |& fgrep printcap
printcap name = lpstat
then something must be wrong with samba. It's starting to look like samba has trouble setting and using correct values for "printing = cups". Since cups has SysV and BSD frontends, you could try the following workaround:
1. Keep the template fragment that sets "printcap name = /etc/printcap"
# find /etc/e-smith -name \*printcap\* | xargs fgrep 'printcap name'
/etc/e-smith/templates-custom/etc/smb.conf/11printcapName:printcap name = /etc/printcap
2. Change the template fragment that sets the "printing" parameter from "printing = cups" to "printing = sysv"
OK, so that is :
# find /etc/e-smith -type f | xargs fgrep 'printing ='
/etc/e-smith/templates/etc/smb.conf/20printing:printing = cups
so, I copy that to 'templates-custom/...' and change it :
# find /etc/e-smith -type f | xargs fgrep 'printing = '
/etc/e-smith/templates/etc/smb.conf/20printing:printing = cups
/etc/e-smith/templates-custom/etc/smb.conf/20printing:printing = sysv
3. Expand the template for /etc/smb.conf
# /sbin/e-smith/expand-template /etc/smb.conf
#
4. Get the output of "testparm -s" and post it, please.
I put them on my web site (would you prefer I post them here for prosperity?) :
http://reality.sgiweb.org/maxw/tmp/samba-debug/testparm-2.txt
5. /etc/e-smith/events/actions/reload-samba
bingo (from my powerbook):
% net -S truth share
unable to open file (No such file or directory)
Password:
print$
Primary
admin-files
shared-files
IPC$
ADMIN$
HP1120C
HP2100-Corp
philly
ricardo
mwaterman
What next? Is this a good workaround to actually use semi-permanently?
-
As you can see from the testparm output, "printing = sysv" does pretty much the same thing as "printing = cups", except that it's not broken.
So you could use this as a workaround, but a better one might even be to:
1. keep the "printcap name = /etc/printcap" bit
2. put this in /etc/e-smith/templates-custom/etc/smb.conf/20printing:
print command = /usr/bin/lp -d '%p' %s; rm %s
lpq command = /usr/bin/lpstat -o '%p'
lprm command = /usr/bin/cancel '%p-%j'
lppause command = lp -i '%p-%j' -H hold
lpresume command = lp -i '%p-%j' -H resume
queuepause command = /usr/bin/disable '%p'
queueresume command = /usr/bin/enable '%p'
That means you have no "printing = something" parameter, so no broken defaults/overrides to worry about.
3. Expand template and reload samba.
Next, you should report the two bugs you found in samba-3.0.7:
1. printcap method of lpstat does not work with CUPS
2. "printing = cups" overrides "printcap name" parameter in smb.conf
Please report these bugs to the packager of your samba package (get his address with "rpm -qi samba" or "rpm -q --changelog samba"). He'll be able to (help you) check if these bugs have already been reported upstream, add info about build options that may be of interest (like: not compiled against libcups), and coordinate the upstream bug reports with you. Please post the upstream bug tickets here for people who want to track this.
-
Looking at the defaults used for your samba configuration, I'm pretty sure that your smbd was not compiled against libcups, but just to make sure, can you confirm that "ldd /usr/sbin/smbd |grep cups" returns nothing?
Please see the following changelog information for the current SME Samba 3 packages. Notice that cups support is shut off.
* Tue Nov 30 2004 Shad L. Lords <slords@mail.com> 3.0.7-1.2sme01
- Rebuild of stock Centos 3.3 package for SME 6.1
- Remove pie patch.
- Remove ACL compile option.
- Remove automount compile option.
- Explicitly disable cups support
- In $preun, replace standard smb service shutdown with
daemontools equivalent. Only good for SME!!
- In %postun, replace standard service restart with
daemontools equivalent. Only good for SME!!
-
Building samba with --disable-cups (or whatever the switch is called) makes sure that smbd isn't linked to libcups. If smbd is linked to libcups it can use libcups library functions for the printing commands, which means you don't need to install any CUPS frontends/clients, like lp, lpr, lprm, cancel, lpstat, etc. If samba was built without libcups-support and you specify "printing = cups" it will just call the various frontends (lp, cancel, etc.), similarly as with any other printing system. So, the fact that samba was built with --disable-cups explains why "ldd smbd" didn't find libcups, it does not explain the problems that dwater encountered.
-
Please report these bugs to the packager of your samba package ... Please post the upstream bug tickets here for people who want to track this.
So, I take it I don't need to do this then - since he actually has actually posted to this thread on the issue?
Let me know.
Thanks.
Max.
-
I would still send Greg the bug reports by email (in two separate messages, one per bug). That will make the bugs easier to track for you and Greg.
BTW, have you tried the alternative workaround with all the specified print commands and no "printing = something"? I'm considering packaging that workaround as an optional patch in e-smith-cups.
-
...but a better one might even be to:
1. keep the "printcap name = /etc/printcap" bit
2. put this in /etc/e-smith/templates-custom/etc/smb.conf/20printing:
print command = /usr/bin/lp -d '%p' %s; rm %s
lpq command = /usr/bin/lpstat -o '%p'
lprm command = /usr/bin/cancel '%p-%j'
lppause command = lp -i '%p-%j' -H hold
lpresume command = lp -i '%p-%j' -H resume
queuepause command = /usr/bin/disable '%p'
queueresume command = /usr/bin/enable '%p'
That means you have no "printing = something" parameter, so no broken defaults/overrides to worry about.
3. Expand template and reload samba.
For the record, yes, the above also works fine.
-
...but a better one might even be to:
1. keep the "printcap name = /etc/printcap" bit
2. put this in /etc/e-smith/templates-custom/etc/smb.conf/20printing:
print command = /usr/bin/lp -d '%p' %s; rm %s
lpq command = /usr/bin/lpstat -o '%p'
lprm command = /usr/bin/cancel '%p-%j'
lppause command = lp -i '%p-%j' -H hold
lpresume command = lp -i '%p-%j' -H resume
queuepause command = /usr/bin/disable '%p'
queueresume command = /usr/bin/enable '%p'
That means you have no "printing = something" parameter, so no broken defaults/overrides to worry about.
3. Expand template and reload samba.
For the record, yes, the above also works fine.
Thanks for confirming. I've added those lines as an optional patch to e-smith-cups. I've put a build of e-smith-cups with the patch applied in http://mirror.contribs.org/smeserver/contribs/rvandenaker/testing/ . That build should work for SME 6.x with samba 3.