# Sudo: Slow and strange problem.



## soupbowl (Mar 12, 2010)

I just did a fresh install of FreeBSD 8 on my server. I installed openeVPN, zsh, sudo and tmux. Anyways, I installed sudo, I edited the config file via


```
visudo
```

I un-commented


```
%wheel ALL=(ALL) ALL
```

 When I sudo a command, I am asked for the password right away. But the command being run
takes 1-2 minutes to activate. It is annoying, but not a huge problem.

 The major problem is if I do something like:

```
sudo vim /var/log/messages
```
to look over the logs and clean them up and save the file.
Once saved no more logs can be written to the file. I tried the same thing
with my samba logs and once I save it after doing a sudo, no logs will be written
to the file.

 I know I can just use SU, I am just curious why this would be happening.


If it helps my sudo config in full is:

```
# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
 %wheel ALL=(ALL) ALL
```


----------



## DutchDaemon (Mar 12, 2010)

Why are you editing live log files? Anyway .. just restart the logging process (like syslogd) afterwards to have it reopen the logfile. Or stop editing live files that are in use by another process, of course. You're basically pulling the rug.


----------



## soupbowl (Mar 12, 2010)

Sorry, I run:

```
/usr/rc.d/syslogd stop
```

before I edit them, unless there is something else I should be stopping before I clean the logs?


----------



## soupbowl (Mar 12, 2010)

Sorry, I also restart syslogd after editing the logs, so it is not that. haha


----------



## gordon@ (Mar 14, 2010)

Don't edit log files; that's a really bad practice to get into.


----------

