sudo: sorry, you must have a tty to run sudo

原贴:http://www.zimbra.com/forums/installation/10553-solved-sudo-sorry-you-must-have-tty-run-sudo.html

Welcome to the Zimbra - Forums.
Welcome to the forums! We encourage you to explore all things Zimbra with our team and members of the community. If you would like to post a comment, please register and review our posting policy & tips.

Reply
 
LinkBack (1) <script type="text/javascript"></script> Thread Tools <script type="text/javascript"></script> Display Modes <script type="text/javascript"></script>

  1 links from elsewhere to this Post. Click to view. # 1 ( permalink)  
Old 07-31-2007, 11:44 AM
Member
 
Join Date: Jul 2007
Posts: 21
BlueHaven is on a distinguished road
Default [SOLVED] sudo: sorry, you must have a tty to run sudo

Running the config and get this error when Initializing ldap


sudo: sorry, you must have a tty to run sudo

Any idea's?

Still on fedora 6
Reply With Quote
  # 2 ( permalink)  
Old 07-31-2007, 11:50 AM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: 6.0.x - NE & FOSS
Posts: 5,431
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

Fedora's has some additional restrictions
As root:
./install.sh -u
vi /etc/sudoers (EDIT: please use visudo instead)
comment out: #Default requiretty
And reinstall (./install.sh)

If requiretty is set, sudo will only run when the user is logged in to a real tty. This will disallow things like 'rsh somehost sudo ls' since rsh does not allocate a tty; because it is not possible to turn off echo when there is no tty present.

Last edited by mmorse : 07-31-2007 at 12:26 PM. Reason: visudo
Reply With Quote
  # 3 ( permalink)  
Old 07-31-2007, 11:56 AM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: 6.0.x - NE & FOSS
Posts: 5,431
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

I knew there was a safer method: visudo
Sudoers - ZimbraWiki
Reply With Quote
  # 4 ( permalink)  
Old 07-31-2007, 12:09 PM
Member
 
Join Date: Jul 2007
Posts: 21
BlueHaven is on a distinguished road
Default

Hmm, well the first way you showed me worked good. Sense this is only a test box I will leave it as is. If I decide to go production I will prop it the way in the article!

Thanks a bunch!!!!
Reply With Quote
  # 5 ( permalink)  
Old 07-31-2007, 12:32 PM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: 6.0.x - NE & FOSS
Posts: 5,431
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

Good to hear,
visudo is just a little safer than a vi no biggie
It essentially locks the sudoers file, provides basic sanity/parse errors checks.
Reply With Quote
  # 6 ( permalink)  
Old 02-11-2009, 07:05 PM
Starter Member
 
Join Date: Feb 2009
Posts: 1
sir_hmba is on a distinguished road
Default

Quote:
Originally Posted by mmorse View Post
comment out: #Default requiretty
Instead of removing the requiretty default for everyone you can selectively override defaults for users/groups. I'm not sure if the original poster was having trouble w/ the ldap user account, but I'll assume he was. In that case:

Code:
Defaults:ldap   !requiretty
See the examples section of the sudoers(5) man page for more information.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值