AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

Avoid user to exit to SHELL via ctrl+c

  • 1.  Avoid user to exit to SHELL via ctrl+c

    Posted Mon September 01, 2014 09:16 AM

    Originally posted by: YanivM


    Hello 

    i tried to cancle this option with trap under /etc/profile but its include every one 

    i have many users 

    Is it possible to to enable it on a group ? or exclude few users ?

    Thanks 


    #AIX-Forum


  • 2.  Re: Avoid user to exit to SHELL via ctrl+c

    Posted Tue September 02, 2014 08:23 AM

    Originally posted by: YannickBergeron


    you can add some logic in your profile, by running command and adding an if block


    #AIX-Forum


  • 3.  Re: Avoid user to exit to SHELL via ctrl+c

    Posted Wed September 03, 2014 05:25 AM

    Originally posted by: w5000



    what do you mean by exit to shell? from what? from a menu?

    if so, I would recommend to start what you want by "exec" in profile

     

    "The  exec  command replaces the current shell process with the specified command. Normally, when you run a command a new process is spawned (forked). The exec  command does not spawn a new process. Instead, the current process is overlaid with the new command. In other words the exec command is executed in place of the current shell without creating a new process. The command implements Unix exec system call.  It is a part of   process control API, the group that also includes fork system call.  See Fork and Exec Unix Model (PowerPoint)."


    #AIX-Forum