VMware Cloud Community
jjamieson
Enthusiast
Enthusiast

Broken pipe error with su

Greetings,

I have a problem with an ESX 3.5 server. I have a user in the sudoers file, but whenever I try to su anything, I get "Broken pipe."

Example:

ttgsineo@rivmware ttgsineo$ sudo /usr/sbin/vdf

Broken pipe

ttgsineo@rivmware ttgsineo$

(For some reason the forums is putting strikeouts for stuff between brackets.)

If I do sudo su -, I get the same thing.

Any ideas?

Reply
0 Kudos
6 Replies
admin
Immortal
Immortal

Paste the contents of /etc/sudoers

Reply
0 Kudos
kjb007
Immortal
Immortal

I've gotten broken pipe if ther's a problem with the file. For instance, I added a character after username, and I got broken pipe, but also received syntax error. As stated, post your sudoers file, but you're probably dealing with a syntax error.

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
admin
Immortal
Immortal

Hi

Have a look to this paper :

Make sure that you uncomment the required lines in the sudoer file

jjamieson
Enthusiast
Enthusiast

Okay, so the problem ended up being that the guy I asked to add my account to the sudoers list didn't do it, he just added my account to a bunch of groups..

It's strange because when he did it, I got "Broken pipe" versus before when I got "You are not in the sudoers list."

Anyways, actually adding the account to the file fixed the problem.

Thans for the suggestions.

Reply
0 Kudos
admin
Immortal
Immortal

The "Broken pipe" error seems to be due to a race-condition type issue with sudo error-reporting.

The following link describes how someone with the same problem debugged sudo using strace to determine the exact cause of the error: (user not in the sudoers file)

https://bugs.launchpad.net/ubuntu/source/sudo/bug/193516

Reply
0 Kudos
admin
Immortal
Immortal

Also, you may prefer to use "sudo -s" over "sudo su -" to start a root shell as it is cleaner.

Actually just tested the above - it doesn't appear to read the root profile.

Message was edited by: appk

Reply
0 Kudos