Re: Calling User Program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-08-26 at 13:39 +0200, Bill Eldridge wrote:
> Alberto Mijares wrote:
> > On Tue, Aug 25, 2009 at 6:41 PM, linux newbie<linux.newbie79@xxxxxxxxx> wrote:
> >   
> >> Hi,
> >>
> >> I am running sshd (version 5.2.p1) in my embedded platform and I can
> >> succesfully login
> >> from ssh client in remote host.
> >>
> >> I like to do some modifications. i.e. After typing username and
> >> password, I want to run a application program directly instead of
> >> prompt. I like to know, which file has to be modified?
> >>
> >> Thanks in Advance
> >>     
> > For wide-system setting:
> >
> > /etc/profile (sh & bash)
> >
> > Per-user settings:
> >
> > ~/.profile (sh & bash)
> > ~/.bash_profile (bash)
> >
> > Regards
> >
> >
> > Alberto Mijares
> >   
> You should be able to set universal or per-user commands
> in the sshd config file if I remember correctly, possibly a
> simpler and more appropriate way to handle this, depending
> on the type of command. (You might have to inform your
> ssh client whether to grab a pty or not.)

Just modify the users shell in /etc/passwd to the program you want to
run.  You might have to also add the entry for your program
to /etc/shells or similar file showing your program as a valid "shell".

When the program exits, the user is disconnected.

Also, beware that your distro might have a tool used to edit the passwd,
if it does, you should use that.

HTH
~k


[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux