<div dir="ltr">Hi Charles,<div><br></div><div>Thanks for the suggestions.</div><div><br></div><div>I did try the 'ssh -t', but it didn't work. </div><div><br></div><div>I ended up just shutting it down, mounting root device on another host and editing the /etc/sudoers from there.</div><div><br></div><div>A bit of a pain, but it worked.</div><div><br></div><div>Thanks again,</div><div><br></div><div>-Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 22, 2018 at 5:49 PM, Charles Ulrich <span dir="ltr"><<a href="mailto:charles@bityard.net" target="_blank">charles@bityard.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When logging in, try "ssh -t <user@host>", this forces pseudo-tty allocation. Although I don't think this will help since it seems you do already have a tty and sudo just doesn't see it. Still worth trying, though.<br>
<br>
After logging in, you could try "bash -l" to make sure you get a real login shell and then try sudo from that.<br>
<br>
In a Red Hat bug, a user posted this attachement (<a href="https://bugzilla.redhat.com/attachment.cgi?id=1305084" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/a<wbr>ttachment.cgi?id=1305084</a>) which is a shell script that wraps the call to sudo around the "script" program, effectively faking a tty. Perhaps this technique can be used to edit your /etc/sudoers file to remove the requiretty option.<br>
<br>
Thanks,<br>
Charles<div><div class="h5"><br>
<br>
On 2018-03-22 15:54, Mark J. Bobak wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi all,<br>
<br>
Can anyone help me with this?<br>
<br>
I'm running in AWS on EC2, and I'm getting this error:<br>
<br>
[ec2-user@ppbaudi-uat-web ~]$ cat /etc/oracle-release<br>
Oracle Linux Server release 6.7<br>
[ec2-user@ppbaudi-uat-web ~]$ tty<br>
/dev/pts/0<br>
[ec2-user@ppbaudi-uat-web ~]$ ls -l `tty`<br>
crw--w---- 1 ec2-user tty 136, 0 Mar 22 15:39 /dev/pts/0<br>
[ec2-user@ppbaudi-uat-web ~]$ id<br>
uid=500(ec2-user) gid=500(ec2-user) groups=500(ec2-user)<br>
[ec2-user@ppbaudi-uat-web ~]$ sudo -i<br>
sudo: sorry, you must have a tty to run sudo<br>
<br>
Clearly, I *do* have a tty, and this is an interactive session, but<br>
sudo thinks I don't have a tty.<br>
<br>
Yes, I know that I can edit /etc/sudoers and change to '!requiretty',<br>
except that I can't cause I need to sudo to be able to edit<br>
/etc/sudoers!<br>
<br>
This is AWS, so booting into single user mode to edit /etc/sudoers is<br>
not an option.<br>
<br>
I guess I could shutdown, mount root device on another server, and<br>
edit /etc/sudoers, but I'd really like to understand root cause, and<br>
I'd prefer to avoid the hassle of unmounting/remounting the root<br>
device....<br>
<br>
Help?<br>
-Mark<br></div></div>
______________________________<wbr>________________________<br>
washlug mailing list washlug web site<br>
<a href="mailto:washlug@washlug.org" target="_blank">washlug@washlug.org</a> <a href="http://www.washlug.org" rel="noreferrer" target="_blank">www.washlug.org</a><br>
<a href="http://linux.marcdatabase.com/mailman/listinfo/washlug" rel="noreferrer" target="_blank">http://linux.marcdatabase.com/<wbr>mailman/listinfo/washlug</a><br>
</blockquote>
______________________________<wbr>________________________<br>
washlug mailing list washlug web site<br>
<a href="mailto:washlug@washlug.org" target="_blank">washlug@washlug.org</a> <a href="http://www.washlug.org" rel="noreferrer" target="_blank">www.washlug.org</a><br>
<a href="http://linux.marcdatabase.com/mailman/listinfo/washlug" rel="noreferrer" target="_blank">http://linux.marcdatabase.com/<wbr>mailman/listinfo/washlug</a><br>
</blockquote></div><br></div>