Project

General

Profile

Bug #987

sudo failures - possibly broken by updates

Added by cpg about 8 years ago. Updated almost 7 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
ubuntu
Target version:
-
Start date:
11/21/2012
Due date:
% Done:

0%


Description

head's up. we believe users who update ubuntu to the latest will see ownCloud install and other apps fail.

see line 18 in:

http://pastebin.com/4DwbzgFi
sudo: no tty present and no askpass program specified
Sorry, try again.

we believe this is related to a user updating all of ubuntu to the lastest updates.

i suspect downgrading the sudo package, if that is possible in some sane way in ubuntu, may help, but i have not tested it.

History

#1 Updated by eckrunal about 8 years ago

downgrade installed all updates. looks like not sudo issue.
sources : http://blogs.plexibus.com/2010/03/16/downgrade-a-package-in-ubuntu/

#2 Updated by bigfoot65 about 8 years ago

I have a fresh Ubuntu 12.04.1 install with all updates. ownCloud installed fine with no errors.

#3 Updated by eckrunal almost 8 years ago

I was getting below error (same for "own cloud" app too) into while installing apps to Amahi. it's also started for "monit" app too.
kg@kg-ubuntu:~$ tail -n 15 /var/log/amahi-app-installer.log
App: ownCloud installed ======= app install end @ Mon Nov 26 22:24:53 -0800 2012 ========== ======= app install begin @ Thu Nov 29 22:11:45 -0800 2012 ==========
Installing app id 4cuidh6p0s under /var/hda/platform/html ENV=production
Your HDA services have been restarted.
Your HDA services have been restarted.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
App: Monit Service Manager installed ======= app install end @ Thu Nov 29 22:11:47 -0800 2012 ==========

Also i have noticed at shell it was also asking sudo password for apache as per below while installing and uninstalling app each time
kg@kg-ubuntu:~$ [sudo] password for apache:[sudo] password for apache:
[sudo] password for apache:

kg@kg-ubuntu:~$

however app installed just fine but can't able to ping.

kg@kg-ubuntu:~$ ping -c 4 monit.home.comping: unknown host monit.home.com

checked monit service status but it was running.

kg@kg-ubuntu:~$ service monit status * monit is running

checked monit-alias too into hda-setting and it's correct

Alias monit -> 10

checked /etc/network/interfaces file and found it's time and date stamped was 4 days ago

kg@kg-ubuntu:~$ cat /etc/network/interfaces# Generated by hdactl on 2012-11-24 15:05:55 / 3
auto lo eth0

iface lo inet loopback

iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.10
dns-search home.com

finally i have added below line into /etc/sudoers file to prevent apache to asking password each times.

apache ALL=(ALL) NOPASSWD:ALL

Now app was installed fine without getting any error into /var/log/amahi-app-installer.log but can't able to ping monit.home.com

kg@kg-ubuntu:~$ tail -n 13 /var/log/amahi-app-installer.logYour HDA services have been restarted.
App: Monit Service Manager uninstalled ======= app uninstall end @ Fri Nov 30 22:55:21 -0800 2012 ========== ======= app install begin @ Fri Nov 30 22:56:22 -0800 2012 ==========
Installing app id 4cuidh6p0s under /var/hda/platform/html ENV=production
Your HDA services have been restarted.
Your HDA services have been restarted. * Stopping daemon monitor monit
...done. * Starting daemon monitor monit
...done.
App: Monit Service Manager installed ======= app install end @ Fri Nov 30 22:56:24 -0800 2012 ==========

I have restarted Amahi HDA by hdactl-hup command and then was able to ping.

kg@kg-ubuntu:~$ ping -c 4 monit.home.comPING monit.home.com (192.168.1.10) 56(84) bytes of data.
64 bytes from hda.home.com (192.168.1.10): icmp_req=1 ttl=64 time=0.039 ms
64 bytes from hda.home.com (192.168.1.10): icmp_req=2 ttl=64 time=0.040 ms
64 bytes from hda.home.com (192.168.1.10): icmp_req=3 ttl=64 time=0.041 ms
64 bytes from hda.home.com (192.168.1.10): icmp_req=4 ttl=64 time=0.046 ms

--- monit.home.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.039/0.041/0.046/0.007 ms

But I was unable to able to access webpage http://monit

i have restarted my client computer network and now able to access webpage now.

During troubleshooting i found below error for /var/log/apache2/error.log

Rails Error: Unable to access log file. Please ensure that /var/hda/platform/html/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed

kg@kg-ubuntu:~$ ls l /var/hda/platform/html/log/production.log
-rw-r--r-
1 root root 0 Oct 27 22:43 /var/hda/platform/html/log/production.log

Changed permission to 0666

kg@kg-ubuntu:~$ sudo chmod 0666 /var/hda/platform/html/log/production.logkg@kg-ubuntu:~$ ls l /var/hda/platform/html/log/production.log
-rw-rw-rw
1 root root 0 Oct 27 22:43 /var/hda/platform/html/log/production.log

#4 Updated by eckrunal almost 8 years ago

I have more app this week released to test and conclude finally what's going on into my HDA

To avoid below error i already added into /etc/sudoers
apache ALL=(ALL) NOPASSWD:ALL

App installed just fine

kg@kg-ubuntu:~$ tail -n 10 /var/log/amahi-app-installer.logApp: Monit Service Manager installed

======= app install end @ Fri Nov 30 23:27:04 -0800 2012 ==========

======= app install begin @ Sat Dec 01 11:19:26 -0800 2012 ==========

Installing app id gz5tknaf8r under /var/hda/platform/html ENV=production

NOTE: file /tmp/amahi-download-cache/1ff38662b923407933abe7212405c6608e2d8d57 written in cache

Your HDA services have been restarted.

Your HDA services have been restarted.

NOTE: file /tmp/amahi-download-cache/a18e6dfc08c9ff250c24d9f08dc79e45b3e8360c written in cache

App: GLPI installed

======= app install end @ Sat Dec 01 11:19:52 -0800 2012 ==========

But can't able to ping

kg@kg-ubuntu:~$ ping -c 4 glpi.home.com

ping: unknown host glpi.home.com

Ran hdactl-hup to restart HDA

kg@kg-ubuntu:~$ hdactl-hup

Your HDA services have been restarted.

Still can't able to ping

kg@kg-ubuntu:~$ ping glpi.home.com

ping: unknown host glpi.home.com

Restarted apache2, bind9 service too still can't able ping.

Finally i ran hdactl and quickly was able to ping now.

kg@kg-ubuntu:~$ ping -c 4 glpi.home.comPING glpi.home.com (192.168.1.10) 56(84) bytes of data.

64 bytes from hda.home.com (192.168.1.10): icmp_req=1 ttl=64 time=0.039 ms

64 bytes from hda.home.com (192.168.1.10): icmp_req=2 ttl=64 time=0.036 ms

64 bytes from hda.home.com (192.168.1.10): icmp_req=3 ttl=64 time=0.039 ms

64 bytes from hda.home.com (192.168.1.10): icmp_req=4 ttl=64 time=0.040 ms

--- glpi.home.com ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2997ms

rtt min/avg/max/mdev = 0.036/0.038/0.040/0.006 ms

But still web apps can't able to reach i have restarted my client network and it's work fine now.

#5 Updated by eckrunal almost 8 years ago

  • Status changed from New to Feedback

#6 Updated by cpg almost 7 years ago

It appears that we never really got to the bottom of this issue. It looked like an upstream update issue, possibly in 12.04.1. Some users still seem to have the issue ... see #1126.

Is a proper /etc/sudoers.d/amahi for ubuntu like this:

User_Alias      HDAUSER = www-data
Cmnd_Alias      HDAWEBAPPS = /var/hda/web-apps/*/elevated/,/var/hda/apps/*/elevated/,/var/hda/elevated
Defaults:HDAUSER       !requiretty
HDAUSER         ALL = NOPASSWD: HDAWEBAPPS

Also available in: Atom