- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Disable Control-C on Linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 08:24 PM
тАО06-23-2004 08:24 PM
I have created a user TEST. How do i disable the Control-C(to break some operation) button and it should only affect this particular user, and not everybody.
I know we can do that in HPUX, but how is it in Redhat 7.0?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 09:19 PM
тАО06-23-2004 09:19 PM
Solutiontrap "" 2
Of course, you need to make sure that the .profile is read. If they log in via xdm/gdm/kdm and then run some type of terminal, you need to make sure that the terminal is started with a "-ls" to ensure the .profile is read. Anyway, however they log in, put the above in .profile and make sure th e .profile is sourced. If it a normal telnet log in, you won't need to do anything else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 09:28 PM
тАО06-23-2004 09:28 PM
Re: Disable Control-C on Linux
btw, the user is trying to access using normal telnet from any other server.
TQ.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 10:45 PM
тАО06-23-2004 10:45 PM
Re: Disable Control-C on Linux
Mark is talking about the users profile file .profile in the users home directory.
rgds
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 11:40 PM
тАО06-23-2004 11:40 PM
Re: Disable Control-C on Linux
Yeah you are correct, You can find .bash_profile in /home/user_name directory.
There you have to edit as per Mark has said. I hope this will work.
Shetty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 11:42 PM
тАО06-23-2004 11:42 PM
Re: Disable Control-C on Linux
.profile should be placed in $HOME, if is not , create it.
other way how to forbid Ctrl+C is following row in .profile:
stty intr =
(all tty settings you get by stty -a)
br Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 11:37 AM
тАО06-24-2004 11:37 AM
Re: Disable Control-C on Linux
CTRL-C is just the shell sending a signal. All you have to do is stop the shell, which is done through 'stty'. The 'intr' (Interrupt, SIGINT) is what you're trying to stop.
Unfortunately, Jan's post will change the CTRL-C to just the '=' key ;)
To disable it, use the following:
stty intr undef
Put this in '/etc/profile' to disable it for all users, or in the users '.bash_profile' (or '.bashrc') file for an individual user (reccomended).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 05:48 PM
тАО06-24-2004 05:48 PM
Re: Disable Control-C on Linux
For every user contains .bash_profile file in their home directory to define it's environment variables or settings.
Else copy the root /.bash_profile file to your home directory and change the owner and file permissions.
Control-C is normally known with intr signal. We can remove that signal as
# stty -isig intr
# ^C
After that it will print that control+c value on the screen. It won't do the action.
You can use stty raw intr to do the same effect. But the prompting will be not as like normal
To know more about control+c ,use ksh man page on intr keyword
Regards,
Muthukumar.