Sudo command hangs
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Every time I try to execute sudo su -
or any other sudo
command for this matter my server hangs, sometimes it take 10 mins to respond and sometimes it never does.
I checked /etc/hosts
file which was configured correctly. I also checked /etc/resolv.conf
file which looked good as well.
any suggestions?
I am running redhat 6.9
linux rhel sudo
 |Â
show 5 more comments
up vote
0
down vote
favorite
Every time I try to execute sudo su -
or any other sudo
command for this matter my server hangs, sometimes it take 10 mins to respond and sometimes it never does.
I checked /etc/hosts
file which was configured correctly. I also checked /etc/resolv.conf
file which looked good as well.
any suggestions?
I am running redhat 6.9
linux rhel sudo
So,â do you have any way of becoming root?
â G-Man
Oct 28 '17 at 6:09
Yes.. Sometimes it allows me to become root
â Ahmed Soliman
Oct 28 '17 at 6:10
Have you tried runningsudo
after youâÂÂre already root?â Does it still hang then?â If so, you might try runningstrace
(or some similar program) on it.
â G-Man
Oct 28 '17 at 6:15
1
When does it hang -- before asking for the password or after? (Also,strace sudo -i
or so might be your friend, even if its output is daunting, because you can see what it's trying to do when it hangs.)
â Ulrich Schwarz
Oct 28 '17 at 6:16
1
@GAD3R I think that resolved my issue
â Ahmed Soliman
Oct 28 '17 at 18:00
 |Â
show 5 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Every time I try to execute sudo su -
or any other sudo
command for this matter my server hangs, sometimes it take 10 mins to respond and sometimes it never does.
I checked /etc/hosts
file which was configured correctly. I also checked /etc/resolv.conf
file which looked good as well.
any suggestions?
I am running redhat 6.9
linux rhel sudo
Every time I try to execute sudo su -
or any other sudo
command for this matter my server hangs, sometimes it take 10 mins to respond and sometimes it never does.
I checked /etc/hosts
file which was configured correctly. I also checked /etc/resolv.conf
file which looked good as well.
any suggestions?
I am running redhat 6.9
linux rhel sudo
edited Oct 29 '17 at 21:38
guntbert
1,0011917
1,0011917
asked Oct 28 '17 at 5:59
Ahmed Soliman
12
12
So,â do you have any way of becoming root?
â G-Man
Oct 28 '17 at 6:09
Yes.. Sometimes it allows me to become root
â Ahmed Soliman
Oct 28 '17 at 6:10
Have you tried runningsudo
after youâÂÂre already root?â Does it still hang then?â If so, you might try runningstrace
(or some similar program) on it.
â G-Man
Oct 28 '17 at 6:15
1
When does it hang -- before asking for the password or after? (Also,strace sudo -i
or so might be your friend, even if its output is daunting, because you can see what it's trying to do when it hangs.)
â Ulrich Schwarz
Oct 28 '17 at 6:16
1
@GAD3R I think that resolved my issue
â Ahmed Soliman
Oct 28 '17 at 18:00
 |Â
show 5 more comments
So,â do you have any way of becoming root?
â G-Man
Oct 28 '17 at 6:09
Yes.. Sometimes it allows me to become root
â Ahmed Soliman
Oct 28 '17 at 6:10
Have you tried runningsudo
after youâÂÂre already root?â Does it still hang then?â If so, you might try runningstrace
(or some similar program) on it.
â G-Man
Oct 28 '17 at 6:15
1
When does it hang -- before asking for the password or after? (Also,strace sudo -i
or so might be your friend, even if its output is daunting, because you can see what it's trying to do when it hangs.)
â Ulrich Schwarz
Oct 28 '17 at 6:16
1
@GAD3R I think that resolved my issue
â Ahmed Soliman
Oct 28 '17 at 18:00
So,â do you have any way of becoming root?
â G-Man
Oct 28 '17 at 6:09
So,â do you have any way of becoming root?
â G-Man
Oct 28 '17 at 6:09
Yes.. Sometimes it allows me to become root
â Ahmed Soliman
Oct 28 '17 at 6:10
Yes.. Sometimes it allows me to become root
â Ahmed Soliman
Oct 28 '17 at 6:10
Have you tried running
sudo
after youâÂÂre already root?â Does it still hang then?â If so, you might try running strace
(or some similar program) on it.â G-Man
Oct 28 '17 at 6:15
Have you tried running
sudo
after youâÂÂre already root?â Does it still hang then?â If so, you might try running strace
(or some similar program) on it.â G-Man
Oct 28 '17 at 6:15
1
1
When does it hang -- before asking for the password or after? (Also,
strace sudo -i
or so might be your friend, even if its output is daunting, because you can see what it's trying to do when it hangs.)â Ulrich Schwarz
Oct 28 '17 at 6:16
When does it hang -- before asking for the password or after? (Also,
strace sudo -i
or so might be your friend, even if its output is daunting, because you can see what it's trying to do when it hangs.)â Ulrich Schwarz
Oct 28 '17 at 6:16
1
1
@GAD3R I think that resolved my issue
â Ahmed Soliman
Oct 28 '17 at 18:00
@GAD3R I think that resolved my issue
â Ahmed Soliman
Oct 28 '17 at 18:00
 |Â
show 5 more comments
2 Answers
2
active
oldest
votes
up vote
2
down vote
Had the same problem on Ubuntu 16.04 on a newly created openstack remote vm. sudo su
hanged for many seconds, maybe up to a minute, before it either worked or not. When it worked it could be made quick and reliable by running this once as root:
echo 127.0.0.1 localhost $(hostname) >> /etc/hosts
add a comment |Â
up vote
0
down vote
The problem can reproduced when the hostname is changed , edit your /etc/hosts
by adding the output of echo $HOSTNAME
after 127.0.0.1
:
127.0.0.1 hostname
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Had the same problem on Ubuntu 16.04 on a newly created openstack remote vm. sudo su
hanged for many seconds, maybe up to a minute, before it either worked or not. When it worked it could be made quick and reliable by running this once as root:
echo 127.0.0.1 localhost $(hostname) >> /etc/hosts
add a comment |Â
up vote
2
down vote
Had the same problem on Ubuntu 16.04 on a newly created openstack remote vm. sudo su
hanged for many seconds, maybe up to a minute, before it either worked or not. When it worked it could be made quick and reliable by running this once as root:
echo 127.0.0.1 localhost $(hostname) >> /etc/hosts
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Had the same problem on Ubuntu 16.04 on a newly created openstack remote vm. sudo su
hanged for many seconds, maybe up to a minute, before it either worked or not. When it worked it could be made quick and reliable by running this once as root:
echo 127.0.0.1 localhost $(hostname) >> /etc/hosts
Had the same problem on Ubuntu 16.04 on a newly created openstack remote vm. sudo su
hanged for many seconds, maybe up to a minute, before it either worked or not. When it worked it could be made quick and reliable by running this once as root:
echo 127.0.0.1 localhost $(hostname) >> /etc/hosts
answered Aug 24 at 11:17
Kjetil S.
1213
1213
add a comment |Â
add a comment |Â
up vote
0
down vote
The problem can reproduced when the hostname is changed , edit your /etc/hosts
by adding the output of echo $HOSTNAME
after 127.0.0.1
:
127.0.0.1 hostname
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
add a comment |Â
up vote
0
down vote
The problem can reproduced when the hostname is changed , edit your /etc/hosts
by adding the output of echo $HOSTNAME
after 127.0.0.1
:
127.0.0.1 hostname
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The problem can reproduced when the hostname is changed , edit your /etc/hosts
by adding the output of echo $HOSTNAME
after 127.0.0.1
:
127.0.0.1 hostname
The problem can reproduced when the hostname is changed , edit your /etc/hosts
by adding the output of echo $HOSTNAME
after 127.0.0.1
:
127.0.0.1 hostname
answered Oct 28 '17 at 18:06
GAD3R
22.7k154895
22.7k154895
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
add a comment |Â
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
I configured it correctly, the issue was fixed but now its back again for no reason. Not sure what the issue is still :(
â Ahmed Soliman
Oct 28 '17 at 21:29
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401008%2fsudo-command-hangs%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
So,â do you have any way of becoming root?
â G-Man
Oct 28 '17 at 6:09
Yes.. Sometimes it allows me to become root
â Ahmed Soliman
Oct 28 '17 at 6:10
Have you tried running
sudo
after youâÂÂre already root?â Does it still hang then?â If so, you might try runningstrace
(or some similar program) on it.â G-Man
Oct 28 '17 at 6:15
1
When does it hang -- before asking for the password or after? (Also,
strace sudo -i
or so might be your friend, even if its output is daunting, because you can see what it's trying to do when it hangs.)â Ulrich Schwarz
Oct 28 '17 at 6:16
1
@GAD3R I think that resolved my issue
â Ahmed Soliman
Oct 28 '17 at 18:00