LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
LinkBack Search this Thread
Old 01-28-2010, 06:12 AM   #1
intermentals
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
How do I Run Login Scripts on OpenBSD 4.4?


I am trying to reverse engineer a server.

Upon login a script requests a prompt for the user to run one of 5 scripts (including rolling back to a previous backup and going to the shell).

I have located the scripts it prompts you to run in /opt/bin

My question is which file points to these scripts on login?

Thanks
 
Old 01-28-2010, 10:04 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 9,426

Rep: Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048
Quote:
Originally Posted by intermentals View Post
I am trying to reverse engineer a server.

Upon login a script requests a prompt for the user to run one of 5 scripts (including rolling back to a previous backup and going to the shell).

I have located the scripts it prompts you to run in /opt/bin

My question is which file points to these scripts on login?

Thanks
Is this for BSD or for Linux?? If you want something to run after the user logs in, put a command either in the users .profile (or .bash_profile), to execute. Or you can add it to the system-wide default profile, usually /etc/profile (may be different on your system, but it will be under /etc/ somewhere...).
 
Old 01-29-2010, 04:30 AM   #3
intermentals
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Original Poster
Rep: Reputation: 0
This is for BSD - where would I find the users .profile file please?
 
Old 01-29-2010, 11:40 AM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 9,426

Rep: Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048Reputation: 1048
Quote:
Originally Posted by intermentals View Post
This is for BSD - where would I find the users .profile file please?
In each of the users home directories. Every user has one, and in my opinion, I'd rather put something there, than in the system profile. In case things go sideways, I'd rather have some 'untouched' logins that don't try to do ANYTHING, except get me to a shell.
 
Old 02-01-2010, 07:32 AM   #5
intermentals
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you very much
 
Old 02-01-2010, 05:21 PM   #6
girarde
Member
 
Registered: Oct 2007
Distribution: OpenBSD
Posts: 71

Rep: Reputation: 23
I am perplexed by the reference to /opt/bin. OpenBSD doesn't have that directory.
 
Old 02-01-2010, 09:48 PM   #7
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
OpenBSD also doesn't drop you into a menu system when you log in, so obviously it's a custom application.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SSH]Which login scripts are run? jamesstanley Linux - Server 3 11-17-2007 07:24 AM
[OpenBSD 4.1] run locate.updatedb after login noir911 *BSD 2 11-03-2007 11:09 AM
Sentences at login Openbsd mullog *BSD 4 03-15-2005 11:23 AM
OpenBSD 3.4 Initial Login Problems TLMS *BSD 4 07-29-2004 07:50 PM
Where to run scripts automatically on login/logout hilltop*Tech Linux - General 2 02-06-2004 11:59 AM


All times are GMT -5. The time now is 11:04 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration