# Sudo times out waiting for password on Ubuntu 12.04

**URL:** <https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966>\
**Category:** Build Environment\
**Created:** [May 12, 2016, 5:57pm UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966 "2016-05-12T17:57:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hselvarajan](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@hselvarajan](https://discuss.circleci.com/u/hselvarajan)\
**Post date:** [May 12, 2016, 5:57pm UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966/1 "2016-05-12T17:57:59Z")

</div>

We use sudo to add the JDK unlimited strength security policy files to the JVM so we can use strong encryption in Java:

```auto
sudo unzip -jo security-api/src/test/resources/UnlimitedJCEPolicyJDK7.zip -d /usr/lib/jvm/jdk1.7.0/jre/lib/security/ 

```

When this command ran this morning (this has been the first build of this repo in a few weeks), sudo prompted for a password:

```auto
[sudo] password for ubuntu: 
command sudo unzip -jo security-api/src/test/resources/UnlimitedJCEPolicyJDK7.zip -d /usr/lib/jvm/jdk1.7.0/jre/lib/security/ took more than 10 minutes since last output

```

This command ran successfully earlier – I wonder if this is related to the recent image updates for Ubuntu? We’re running this on the 12.04 image.

sudo does not ask for a password on Ubuntu 14.04.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [May 13, 2016, 2:57am UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966/2 "2016-05-13T02:57:19Z")

</div>

Hi,

It’s hard for me to say if it really should be running that long without knowing what your entire build is doing and the zip file contents. How long did that line use to take?

This may only be a bandaid but based on the problem showed here, using the `timeout` modifier for that line might help. By default CircleCI kills commands that hit 10 minutes. You can increase that timeout. Here’s the [referenced doc](https://circleci.com/docs/configuration/#modifiers).

I hope that helps.

---

<div class="post-metadata">

**Author:** ![hselvarajan](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@hselvarajan](https://discuss.circleci.com/u/hselvarajan)\
**Post date:** [May 13, 2016, 5:30am UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966/3 "2016-05-13T05:30:16Z")

</div>

Thank you for your response, but I think you misunderstood the problem.

Per [this](https://circleci.com/blog/sudo-circleci-make-me-a-sandwich/) post on the CircleCI blog, _sudo should not ask for a password_ on a CircleCI build machine, and this is how CircleCI machines have worked until recently.

The reason that sudo is timing out is not because the command takes a long time to run, but because sudo asks for a password (which it should not) and times out waiting for the password to be entered.

Finally, sudo on CircleCI only asks for a password on Ubuntu 12.04, not on 14.04. This leads me to suspect that it’s some kind of configuration problem on the Ubuntu 12.04 image.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [May 13, 2016, 3:37pm UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966/4 "2016-05-13T15:37:23Z")

</div>

You are completely correct, I misread. Looking into this now.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [May 13, 2016, 3:49pm UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966/5 "2016-05-13T15:49:41Z")

</div>

Haven’t been able to replicate this so far on Ubuntu 12.04 myself. Would it be possible if you could PM me a link to your build having this issue? (You can click my username, then ‘message’ to PM me).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:32am UTC](https://discuss.circleci.com/t/sudo-times-out-waiting-for-password-on-ubuntu-12-04/3966/6 "2018-06-18T11:32:04Z")

</div>

Closed on June 18, 2018, 11:32am UTC


