Sudo Su command hangs in jenkins

298 views
Skip to first unread message

sravan

unread,
Oct 14, 2019, 3:45:31 PM10/14/19
to Jenkins Users
Hi All,

I am running a fab script using jenkins . The problem I am facing is I need to get the logs from docker So I need to do "Sudo su" it works fine manually but when I run it using jenkins it get hanged after it type Sudo su.

Any help is appreciated 

Slide

unread,
Oct 14, 2019, 3:48:35 PM10/14/19
to Jenkins User Mailing List
Does the jenkins user have access to run sudo without a password?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e851fd36-ce81-4833-a53b-cb25a37d96eb%40googlegroups.com.


--

sravan

unread,
Oct 14, 2019, 4:52:14 PM10/14/19
to Jenkins Users
when I do sudo visudo 
I have this one 
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
jenkins ALL=(root) NOPASSWD: ALL
%sudo ALL=(ALL) NOPASSWD: ALL

On Monday, October 14, 2019 at 12:48:35 PM UTC-7, slide wrote:
Does the jenkins user have access to run sudo without a password?

On Mon, Oct 14, 2019 at 12:45 PM sravan <skkamb...@gmail.com> wrote:
Hi All,

I am running a fab script using jenkins . The problem I am facing is I need to get the logs from docker So I need to do "Sudo su" it works fine manually but when I run it using jenkins it get hanged after it type Sudo su.

Any help is appreciated 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Slide

unread,
Oct 14, 2019, 5:05:18 PM10/14/19
to Jenkins User Mailing List
Are you able to sudo su as the Jenkins user manually on the system?

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1b077c51-053b-40a7-a2f3-eb698b459411%40googlegroups.com.

sravan

unread,
Oct 14, 2019, 5:12:54 PM10/14/19
to Jenkins Users
when I type in Sudo su manually it works 


On Monday, October 14, 2019 at 2:05:18 PM UTC-7, slide wrote:
Are you able to sudo su as the Jenkins user manually on the system?

On Mon, Oct 14, 2019, 13:52 sravan <skkamb...@gmail.com> wrote:
when I do sudo visudo 
I have this one 
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
jenkins ALL=(root) NOPASSWD: ALL
%sudo ALL=(ALL) NOPASSWD: ALL

On Monday, October 14, 2019 at 12:48:35 PM UTC-7, slide wrote:
Does the jenkins user have access to run sudo without a password?

On Mon, Oct 14, 2019 at 12:45 PM sravan <skkamb...@gmail.com> wrote:
Hi All,

I am running a fab script using jenkins . The problem I am facing is I need to get the logs from docker So I need to do "Sudo su" it works fine manually but when I run it using jenkins it get hanged after it type Sudo su.

Any help is appreciated 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e851fd36-ce81-4833-a53b-cb25a37d96eb%40googlegroups.com.


--

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Slide

unread,
Oct 14, 2019, 6:05:46 PM10/14/19
to Jenkins User Mailing List
Just to clarify, you are doing this AS the Jenkins user, not another user, but as the actual user that the jenkins agent is running as.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0dbfc76f-e774-433f-8fb3-655b1f99184e%40googlegroups.com.


--

sravan

unread,
Oct 14, 2019, 8:01:05 PM10/14/19
to Jenkins Users

Actually it worked I put in a shell script and used Sudo
On Monday, October 14, 2019 at 3:05:46 PM UTC-7, slide wrote:
Just to clarify, you are doing this AS the Jenkins user, not another user, but as the acActautual user that the jenkins agent is running as.

Reply all
Reply to author
Forward
0 new messages