DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 26th June 2008
EvilMonkeySlayer EvilMonkeySlayer is offline
New User
 
Join Date: Jun 2008
Posts: 3
Thanked 0 Times in 0 Posts
Default Automatic launching of a script upon login. Help me figure this out

Okay, i've been mulling about an idea ever since I got works new FTP server up and running.

Currently, here's how it works:

I have the ftp server running with virtual users as a security precaution, this is running pure-ftpd on top of OpenBSD. At the moment all user management is done by me, so creation, modifying etc. All me.

I've had an idea to both make my life a bit more simpler and possibly offload the work to someone else. I have seen in the past that upon login on a console a bash script (or some kind of shell script) can run upon immediate login.

My plan is to create an interactive script that can create, modify and delete users purely from simple selections, for example this would appear upon connection:

Quote:
Welcome to the bla FTP server, please make your selection:

1) Create user
2) Modify user
3) Delete user
4) Logout
Upon entering a number and pressing enter it goes through further menus to do this like change passwords, entering user names etc. (essentially the script passes the commands like "pure-pw useradd %username% -u ftpuser -d %homedir%")

Here's my plan as I see it, I need to do the following:
  • Figure out how to do automatic login via putty with public/private key authentication (this is especially important if I offload the work to someone else)
  • Create a (super?)user specifically for this task, I don't want it to have full root capabilities. Just enough for pure-ftpd.
  • Learn a command line scripting language
  • Figure out how to get it to launch the script immediately upon connection (set the script as the shell?)
  • Disable users ability to ctrl-c out, if they ctrl-c I don't want it going to the command line but to immediately logout. In other words no shell access.

I'm open to suggestions on how to approach this. Any ideas on what I should be reading up on?

I believe I have now got the auto-login with putty figured out. By leaving out the pass phrase (from puttygen) I can get it to auto-login with putty.

This is a very base OpenBSD 4.3 install, all i've got installed is pure-ftpd and nano. (I cannot stand ed, vi or any of the other remember 27 million key combinations programs)

I posted this to bsdforums before realising it was a walking corpse intent on spewing spam.
Reply With Quote
 

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tmux disable automatic resize Carpetsmoker General software and network 7 25th June 2009 10:54 PM
Login automatically map7 FreeBSD General 1 12th October 2008 11:09 PM
How to set up ssh login cssgalactic FreeBSD General 12 28th June 2008 06:00 PM
Automatic Mount for Devices/Filesystems vermaden FreeBSD General 11 12th June 2008 04:55 AM
Automatic Thread Subscription When Posting? JMJ_coder Feedback and Suggestions 6 6th May 2008 03:20 AM


All times are GMT. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick