LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-23-2005, 11:45 AM   #1
mago
Member
 
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with 2.6.16.18 (still off the hook)
Posts: 284

Rep: Reputation: 33
Problem invoking user


Hello there,

I just made a script to start Postgre SQL automaticly, but the firts action is being denied.

When I invoke postgre user with
Code:
su - postgre
I get the following error
Code:
/dev/pts/1: Operation not permited
and the script stops.

I'm running PostgreSQL on Slackware 10.1 with kernel 2..4.29, any help will be more than apreciated.


Thanks a bunch in advanded.
 
Old 03-23-2005, 03:19 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Looks like the biff-thing-a-ma-bob ...

Two ways of getting around it:
a) use
su postgre
(without the hyphen) ... if that's not an option
because you're setting special env variables
or other reasons

b) edit /etc/profile
Code:
# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
 biff y
fi
and comment that if-statement out.


Not quite sure why processing should actually
stop, though, that error should be non-fatal.


Cheers,
Tink
 
Old 03-24-2005, 09:35 AM   #3
mago
Member
 
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with 2.6.16.18 (still off the hook)
Posts: 284

Original Poster
Rep: Reputation: 33
Thanks a lot, actually I read about the biff last night and after comenting out that if on the profile it works just fine.

But I'm still trouble about the biff messing things that way, I quite don't undestand why is such a problem.
 
Old 03-24-2005, 11:02 AM   #4
mago
Member
 
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with 2.6.16.18 (still off the hook)
Posts: 284

Original Poster
Rep: Reputation: 33
Ok, here I come again....

After disableing the biff, like Tinkster suggested , I just ran into another problem....

I set up the .bashrc on the user so I can invoke the enviroment variables that I need such as the PGDATA and the bin folder for postgres in this case but.....

Even when I logon normaly the .bashrc is being ignored.

For the time being I just edited the /etc/profile so the script still works but that is beyond the point, I haven't had those problems before..., well to be honest this is the first time I use my beloved Slackware for a production server so that might be the reason.


What am I missing?

Please fill me in, at this point I'm clueless...



Thanks a lot.


Cheers!!!!!
 
Old 03-29-2005, 04:25 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Your problem is the choice of file ... since you're running
as bash as a login-shell you need to a) put the pg-stuff
into .bash_login or b) source .bashrc from .bash_login
or c) (my personal preference) create a /etc/profile.d/pg.sh
with the relevant export statements in it and make it executable.


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems invoking DigiChat installer. akiru Linux - Software 2 07-28-2011 07:04 AM
Invoking other processes velan Debian 2 06-04-2004 09:39 AM
Invoking NT Domain user authentication for restricted web pages explorer Linux - Networking 1 10-08-2003 05:19 AM
Invoking bootloader radhapriya Programming 1 03-27-2003 07:45 PM
Serial Port Driver- Interrupt Invoking Problem sinux Linux - Software 0 03-07-2003 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration