- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How To Restrict $ Prompt!!!!
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
Forums
Discussions
Discussions
Discussions
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
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
09-22-2000 10:21 PM
09-22-2000 10:21 PM
How To Restrict $ Prompt!!!!
I have kept some menu script in .profile of user so when I am doing,
# su - user --> no problem.
But in case of,
# su user --> I am getting $ prompt, how to avoid it.
Next question is,
While doing,
# pg filename <-
if i issue a command "!sh" at colon (:), I get a $ prompt, How to avoid it.
thanx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2000 11:43 PM
09-22-2000 11:43 PM
Re: How To Restrict $ Prompt!!!!
Include the executable command in the .profile of all the users and use the su -c user
(su -c oracle)
The second part of the question is okay. it's result is right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2000 03:54 AM
09-23-2000 03:54 AM
Re: How To Restrict $ Prompt!!!!
To answer your second question, pg and lots of other programs use the contents of the variable SHELL which will be set to the shell entry for the user from /etc/passwd.
If you change this to '/usr/bin/false' or maybe to the name of a script that simply prints a message like 'Shell access not allowed!' then the user will not get a shell prompt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2000 11:35 AM
09-23-2000 11:35 AM
Re: How To Restrict $ Prompt!!!!
One simple solution to your first question is to add the following line to the bottom of the user .profile:
exec
Upon exiting
With regard to your second question, John's response above applies. Using John's suggestions and the exec
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2000 11:28 PM
09-27-2000 11:28 PM
Re: How To Restrict $ Prompt!!!!
1. su user
Switching user without exec .profile (env file)
2. su - user
Switching user and exec .profile
"-" : exec .profile (env file)