# Upgrade sudo from ports error.



## ahyim (Apr 11, 2011)

Hi everyone!  I just upgraded sudo from ports, and first I got these error messages :

```
Checking existing sudoers file for syntax errors.
visudo: >>> /usr/local/etc/sudoers: /usr/local/etc/sudoers.d near line 96 <<<
parse error in /usr/local/etc/sudoers near line 96
```

So I delete previous version and old sudoers and reinstall new one.
I also got error messages from visudo:


```
visudo: >>> /usr/local/etc/sudoers: /usr/local/etc/sudoers.d near line 98
```
I checked out this line in sudoers:

```
#includedir /usr/local/etc/sudoers.d
```

and try put a space after #, everything goes okay!

```
# includedir /usr/local/etc/sudoers.d
```

I don't know what's going on!


----------



## ckester (Apr 11, 2011)

Perhaps *#includedir* without a space is an include directive, but when you add a space, it becomes a comment?

I saw the same error and hacked around it by adding a second '#' in front of the "#includedir".  In that case, I'm almost positive I converted it to a comment.

My /usr/local/etc/sudoers.d file is empty.  I don't know if that's the root cause, but it might be pertinent.


----------



## ahavatar (Apr 11, 2011)

In my case, there is no such directory /usr/local/etc/sudoers.d. I've solved the error by just creating an empty directory there and then portupgrade.


----------



## wblock@ (Apr 11, 2011)

There's a new entry about this in /usr/ports/UPDATING today.  It wasn't there yesterday.


----------

