- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- automatically execute a script
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
06-21-2005 06:15 PM
06-21-2005 06:15 PM
Could you tell me if there are any possibilities that when the user is geting logged in HPUX to automatically execute a script witch contains unix instructions ?
Please be so kind and describe in details all the modalities you know.
Thank you very mutch.
Best regards.
Roxana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 06:27 PM
06-21-2005 06:27 PM
SolutionYou can put your script execution in /etc/profile or $HOME/.profile file.
-- /tmp/test.sh
#!/bin/ksh
uname -a
who am i
hostname
chmod 755 /tmp/test.sh
-- /etc/profile --
/tmp/test.sh
or
--- $HOME/.profile
/tmp/test.sh
You can also do like . /tmp/test.sh to execute them there.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 08:12 PM
06-21-2005 08:12 PM
Re: automatically execute a script
As stated above create script & then include it in $HOME/.profile of that user. But I would advice script to be kept in the home directory of user itself rather then /tmp with proper permissions. If it is to be shared by all users then keep it somewhere in /etc & have a executable link in /etc/profile itself rather then .profile of all users.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 09:02 PM
06-21-2005 09:02 PM
Re: automatically execute a script
add the script in $HOME/.profile of the user directory, this script will get executed every time the user logs on.
make sure you have set executable permission for this file. $HOME refers to the home directory of the user.
if you want the script to get executed for all the users when they login, then add the script in /etc/profile which will be called for all the users when they login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 09:25 PM
06-21-2005 09:25 PM
Re: automatically execute a script
/etc/profile is global. You can add anything you want (scripts execution, variable settings) in that script and it will be executed anytime someone logs on.
$HOME/.profile is personal, and different for each user. You can set up your own env using this file. It is created upon user creation by copy of /etc/skell/.profile (if you want something to be in everybody .profile, change it here for future users).
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2005 01:48 AM
06-22-2005 01:48 AM
Re: automatically execute a script
Please note that it works different if using a GUI (e.g. CDE). CDE uses the file .dtlogin instead. If you want CDE to read the .profile you must set the variable DTSOURCEPROFILE=true in .dtprofile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2005 01:49 AM
06-22-2005 01:49 AM
Re: automatically execute a script
Please note that it works different if using a GUI (e.g. CDE). CDE uses the file .dtprofile instead. If you want CDE to read the .profile you must set the variable DTSOURCEPROFILE=true in .dtprofile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2005 01:52 AM
06-22-2005 01:52 AM
Re: automatically execute a script
Sorry for the double posts, ignore the first one, there was an error in it (.dtlogin instead of .dtprofile)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:45 AM
06-29-2005 01:45 AM