Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So, strangest thing happening on Debian PostgreSQL user:

lab3:~# su - postgres
postgres@lab3:~$ plogout
lab3:~# 

And:

lab3:~# su postgres
postgres@lab3:/root$ pexit
lab3:~#

What is happening here? Well, if right after I use su to change to the postgres user, using su - or su, I press p (like I was going to write psql) I get logged out by logout or exit. That doesn't happen if I press enter and then press p on the line below, it only happens if the first thing I press is p. Apparently it happens with any character, but sometimes it fails on e or a.

Are you asking WHAAAAAT? Yeah. Me too. This is happening on all our Debian Lenny machines but not on at least one Squeeze we have.

share|improve this question
    
What does /etc/passwd detail for postgres' shell? –  jscott Apr 1 '11 at 15:43
    
@jscott /bin/bash –  coredump Apr 1 '11 at 16:47
    
Guess, and therefore not answer-worthy, but: some crazy scriptage in .bashrc/.bash_profile, maybe? The scenario you describe is beyond bizarre. –  Jeff Albert Jan 13 '12 at 22:42
    
Incidentally, can you log in from console or ssh to the postgres user with different results? –  Jeff Albert Jan 13 '12 at 22:42
    
su - postgres set all parameters, as when user postgres login to the machine (including .bash files for the opening relation), but su postgres don't do this. It can deal with this behavior... –  Jan Marek Jan 26 '12 at 8:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.