Author Topic: Sane driving me insane  (Read 6038 times)

0 Members and 1 Guest are viewing this topic.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #15 on: April 24, 2013, 11:13:52 pm »
Quote
I would suggest to comment out the port range in saned.conf as port 6566/tcp is already allocated to it:


Do you mean like this ?
#
Quote
# ONLY use this if your saned server is sitting behind a firewall. If your
# firewall is a Linux machine, we strongly recommend using the
# Netfilter nf_conntrack_sane connection tracking module instead.

# data_portrange = 10000 - 10100


## Access list
192.168.2.0/24
# A list of host names, IP addresses or IP subnets (CIDR notation) that
# are permitted to use local SANE devices. IPv6 addresses must be enclosed
# in brackets, and should always be specified in their compressed form.

EDIT
I've installed xinetd
« Last Edit: April 24, 2013, 11:21:06 pm by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13178
  • Karma: 321
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Sane driving me insane
« Reply #16 on: April 24, 2013, 11:15:36 pm »
yes

then restart saned:
Code: [Select]
sudo service saned restart
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #17 on: April 24, 2013, 11:17:31 pm »
saned restarted
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #18 on: April 24, 2013, 11:30:37 pm »
Graeme is going to bed now because it's late and his brain hurts.....so much :)
« Last Edit: April 25, 2013, 07:45:16 am by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13178
  • Karma: 321
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Sane driving me insane
« Reply #19 on: April 24, 2013, 11:40:56 pm »
I'll have a play tomorrow and see if I can work it out.

is the server Ubuntu, Mint, or Peppermint ?

and which version ?
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #20 on: April 25, 2013, 06:02:29 am »
Server & Client are both peppermint 3
« Last Edit: April 25, 2013, 07:07:18 am by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #21 on: April 25, 2013, 07:05:33 am »
Hi again

Just to keep you updated

I followed the tutorial posted by SeZo  http://richardappleby.wordpress.com/2012/07/28/building-a-scan-server-on-ubuntu-server-12-04/ but still no luck

I had previously looked at that tutorial but decided not follow it at first it because it looked more complicated in particular this part

Quote
At this point we need to make sure that saned can access the scanner. I did this by setting up a udev rule to arrange for the permissions on the underlying device to be set so saned can access it. For my convenience I also set up a “well known” symbolic name (/dev/scanner) to the scanner device too, as that base device can change depending on what is plugged into the server at any point in time; I’m pretty sure saned doesn’t require this though. I achieved this by making the new file /etc/udev/rules.d/90-scanner.rules contain the single line:
ATTRS{idVendor}==”04a9″,ATTRS{idProduct}==”2206″,SYMLINK+=”scanner”,MODE=”0660″,OWNER=”root”,GROUP=”saned”


I'm not sure whether I should have added the idVendor & idProduct inside the brackets or put them inside inverted commas ( it would go a long way if people writing these tutorials would realise that we don't all understand the finer points of syntax) but anyway I did it like this

Quote
ATTRS{ID 05d8:4002 }==”04a9″,ATTRS{ScanMagic 1200 UB Plus Scanner
}==”2206″,SYMLINK+=”scanner”,MODE=”0660″,OWNER=”root”,GROUP=”saned”


other than that the tutorial seemed simple enough to follow and I carried out each instruction on both server & client


Many thanks for your help


Graeme
« Last Edit: April 25, 2013, 07:47:07 am by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13178
  • Karma: 321
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Sane driving me insane
« Reply #22 on: April 25, 2013, 10:19:00 am »
IF, and I repeat IF you needed a udev rule at all (which I doubt if xsane finds the scanner), it should have read:-

and if the Vendor:Product ID string from lsusb read 05d8:4002

Code: [Select]
ATTRS{idVendor}==”05d8″,ATTRS{idProduct}==”4002″,SYMLINK+=”scanner”,MODE=”0660″,OWNER=”root”,GROUP=”saned”

I'll have a go at this in a bit.

can you post the output from:
Code: [Select]
dpkg -l | grep xinetd

Can you also post the contents of:
Code: [Select]
gedit /etc/sane.d/net.conf
from the client.

and:
Code: [Select]
gedit /etc/xinetd.d/saned
from the server.

--
« Last Edit: April 25, 2013, 10:32:57 am by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #23 on: April 25, 2013, 12:18:53 pm »
Client

Code: [Select]
chloe@Linux2 ~ $ dpkg -l | grep xinetd
chloe@Linux2 ~ $



Code: [Select]
gedit /etc/sane.d/net.conf

Quote
# This is the net backend config file.

## net backend options
# Timeout for the initial connection to saned. This will prevent the backend
# from blocking for several minutes trying to connect to an unresponsive
# saned host (network outage, host down, ...). Value in seconds.
 connect_timeout = 20




Server

Code: [Select]
 gedit /etc/xinetd.d/saned

Shows an empty file
« Last Edit: April 25, 2013, 12:47:26 pm by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13178
  • Karma: 321
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Sane driving me insane
« Reply #24 on: April 25, 2013, 01:57:47 pm »
Cracked it on my HP AiO (Server = Ubuntu 11.10 .. Client = Peppermint 3 :)
(I had to add saned to the lp group .. but I'm not sure that's necessary for your separate scanner)

on ALL PC's .. make sure sane is installed:
Code: [Select]
sudo apt-get install sane



On the SERVER .. run:
Code: [Select]
sudo apt-get install xinetd
then
Code: [Select]
sudo gedit /etc/xinetd.d/saned
and make it read:-
Code: [Select]
service sane-port
{
port = 6566
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = saned
wait = no
disable = no
}
SAVE the file, and run:
Code: [Select]
sudo service xinetd restart
then
Code: [Select]
sudo service saned restart

now see what happens if you fire up Xsane on the client.



if still nothing .. on the SERVER run:
Code: [Select]
sudo -s
then
Code: [Select]
su -s /bin/bash saned
then
Code: [Select]
scanimage -L
What's the output from that last command ?

Hint -
to exit to a normal prompt, just run
Code: [Select]
exit
twice .. or just close the terminal and repoen.

--
« Last Edit: April 25, 2013, 02:12:48 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #25 on: April 25, 2013, 02:20:32 pm »
Quote
graeme@Linux3 ~ $ sudo -s
[sudo] password for graeme:
Linux3 ~ # su -s /bin/bash saned
saned@Linux3 /home/graeme $ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
saned@Linux3 /home/graeme $

Needless to say still no joy  :(
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13178
  • Karma: 321
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Sane driving me insane
« Reply #26 on: April 25, 2013, 02:30:30 pm »
Close the terminal and reopen it.

Then run:
Code: [Select]
sudo adduser saned lp

now what's the output if you run:
Code: [Select]
sudo -s
then
Code: [Select]
su -s /bin/bash saned
then
Code: [Select]
scanimage -L
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #27 on: April 25, 2013, 02:36:03 pm »
Quote
service saned
{
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = scanner
wait = no
disable = no
}


Code: [Select]
graeme@Linux3 ~ $ sudo gedit /etc/xinetd.d/saned
[sudo] password for graeme:
graeme@Linux3 ~ $ sudo adduser saned lp
Adding user `saned' to group `lp' ...
Adding user saned to group lp
Done.
graeme@Linux3 ~ $ sudo -s
Linux3 ~ # su -s /bin/bash saned
saned@Linux3 /home/graeme $ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
saned@Linux3 /home/graeme $

If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13178
  • Karma: 321
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Sane driving me insane
« Reply #28 on: April 25, 2013, 02:44:47 pm »
On the SERVER ..

Run:
Code: [Select]
sudo gedit /etc/xinetd.d/saned

and make it read:-
Code: [Select]
service sane-port
{
port = 6566
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = saned
wait = no
disable = no
}

SAVE the file, then REBOOT

Now what's the output from:
Code: [Select]
sudo -s
then
Code: [Select]
su -s /bin/bash saned
then
Code: [Select]
scanimage -L
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Emegra

  • Hero Member
  • *****
  • Posts: 2382
  • Karma: 53
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Sane driving me insane
« Reply #29 on: April 25, 2013, 02:54:05 pm »
Ok I've edited the /etc/xinetd.d/saned file, but unfortunately I can't reboot as I'm doing this via Team Viewer and I won't physically get at the PC's till I finish work

Unless there's another way we can do it ?






Graeme
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal