LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-27-2013, 03:41 PM   #1
theace18
LQ Newbie
 
Registered: Jun 2012
Posts: 25

Rep: Reputation: Disabled
Issues running sudo with winbind


Hey Everyone,

I am running CentOS 6.4 64 bit system running Winbind to authenticate to Active Directory. In our environment we have two AD Groups that can access these servers: UnixAdmins and UnixUsers. Depending on which AD group you are in, you have certain access rules via sudo. Here's a snippit from my sudoers file:

## Allows people in group wheel to run all commands
%ADDOMAIN\\UnixAdmin ALL=(ALL) ALL #gives AD group sudo rights
%ADDOMAIN\\UnixUsers ALL = NOPASSWD: /scripts/hotfix/deploy.sh, /scripts/hotfix/updateBuildVersion.sh


As you can tell from the entry in the sudoers file, anyone who assigned to the UnixAdmin group has sudo all. If they are assigned to the UnixUsers group, they have access to just TWO scripts that can run via no password.

So here is the interesting thing. In my /etc/security/pam_winbind.conf file, I have an entry which states:

require_membership_of = UnixAdmin,UnixUsers

This allows me to only allow these two active directory users to log into the Linux server. The problem is, when I try to run a script from our bastion host it gives me the error:

[ADDOMAIN\pconway@bastion~]$ ssh web60 sudo /scripts/hotfix/updateBuildVersion.sh
sudo: no tty present and no askpass program specified


Yet if I comment out that line in the pam_winbind.conf file, I don't get that error. Any reason why that would happen? I am at a loss. Thanks.

- Philippe
 
Old 11-26-2013, 10:54 PM   #2
theace18
LQ Newbie
 
Registered: Jun 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
Hoping to get an answer to this. Any thoughts?
 
Old 11-28-2013, 12:19 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
This doesn't look like a winbind problem to me. I've run into this before, and the root cause is that sudo refuses to run without a tty. When you issue a command directly as an argument to ssh, it, by default, does not give you a tty, and thus all sudo commands will fail.

The secret I found was to add the -t flag to ssh, which will force it to give you a tty. You might give that a try and see if it fixes your problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] winbind samba issues---- antnish Linux - Server 0 10-31-2012 05:46 PM
Issues when running 'sudo yum update' veeruk101 Linux - Newbie 2 10-19-2011 05:13 PM
Winbind authentication issues lpwevers Linux - Server 1 05-12-2009 04:55 AM
Winbind issues dvishloff Linux - Networking 3 03-02-2006 10:04 AM
winbind and Upper/lowecase issues taggedd Linux - Networking 0 12-16-2003 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration