ericpaulbishop / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
185 stars 37 forks source link

sudo: illegal option `-n' #118

Closed tvdeyen closed 12 years ago

tvdeyen commented 12 years ago

Hi sudo returning this error while testing if the web user can sudo as git user:

sudo: illegal option '-n'

I am running Debian Lenny 5.0.5 on my machine.

Do we actually need the -n option? As I understand it (correct me, if I am wrong) the -n option only checks if a sudo session is already present with this user.

And I only found the n option twice in your source. Only while testing if the command can be executed.

So, do you really need it?

I will remove this for now and see if I ran into any problems with that.

kubitron commented 12 years ago

Actually, "-n" is a non-interactive flag that says to "fail" if a password is needed.

What version of sudo are you using? (Type "sudo -V"). The -n flag seems to have been in sudo since 1.6.9p15 (March 2008). It is possible to make this use the -S flag (since version 1.6.2p3, Feb 2000)...

tvdeyen commented 12 years ago

I actually had a very old sudo. I updated it and not having this issue anymore. I still have a lot of other issues. But this is not the topic here.