HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Execute the .profile
Operating System - HP-UX
1838238
Members
4795
Online
110125
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
11-12-2006 11:37 PM
11-12-2006 11:37 PM
Execute the .profile
Dear All
Users .dtprofile I have uncommented the DTSOURCE line. Also in the .profile of the user I have set the the following in .profile of the users.
alias su="su -".
HISTFILE=/.hist/${HOME}/`who am i|awk '{ print $1}'`-`date +%d:%m:%y.%H:%M`
export HISTFILE
HISTSIZE=500
export HISTSIZE
User logs in through through CDE or any desktop environment [like reflection, xbrowser etc]
When the user su's using "su - root" then the history file records the activities but when he su's using "su root" it does not log his activities in the History file.
How can I get the system to log the activities when he logs through "su root" in the hsitory file.
Thanks
Faizer
Users .dtprofile I have uncommented the DTSOURCE line. Also in the .profile of the user I have set the the following in .profile of the users.
alias su="su -".
HISTFILE=/.hist/${HOME}/`who am i|awk '{ print $1}'`-`date +%d:%m:%y.%H:%M`
export HISTFILE
HISTSIZE=500
export HISTSIZE
User logs in through through CDE or any desktop environment [like reflection, xbrowser etc]
When the user su's using "su - root" then the history file records the activities but when he su's using "su root" it does not log his activities in the History file.
How can I get the system to log the activities when he logs through "su root" in the hsitory file.
Thanks
Faizer
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:56 PM
11-12-2006 11:56 PM
Re: Execute the .profile
Faizer,
why do you not want to use sudo as suggested in reply to your earlier thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1022171
Other solutions/explanations are in :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=811081
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=80512
why do you not want to use sudo as suggested in reply to your earlier thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1022171
Other solutions/explanations are in :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=811081
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=80512
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:11 AM
11-13-2006 12:11 AM
Re: Execute the .profile
The problem is that DTSOURCEPROFILE is an incomplete solution. You want a 'normal' login like telnet. That means first /etc/profile is run, then .profile (for POSIX shells like ksh). What your users are expecting is a 'normal' Unix login which (for POSIX shells) first runs /etc/profile and then .profile (DTSOURCEPROFILE doesn't run /etc/profile). It turns out that the default for all terminal emulators in Xwindows is to startup WITHOUT executing the usual profiles. To fix this, put this into every HOME directory for every user:
echo "*loginShell: true" >> $HOME/.Xdefaults
Now terminal emulators such as hpterm, xterm or dtterm will login as expected and will have the same profiles as a telnet connection. You can also add additional resource settings for the emulators or other Xwindow applications. For example, the contents might look like this:
*loginShell: true
HPterm*scrollBar: true
HPterm*saveLines: 10s
HPterm*background: navy
HPterm*foreground: white
Xterm*background: darkslateblue
Xterm*foreground: white
Xterm*saveLines: 10s
Xterm*scrollBar: true
Dtterm*saveLines: 10s
Dtterm*scrollBar: true
and after adding these lines to .Xdefaults, all hpterm, xterm and dtterm windows will have a scroll bar plus 10 screens (800 lines) of history. hpterm will have a dark blue with white letter color scheme while xterm will have a more gray-blue background with white letters. dtterm will match the overall CDE color scheme.
.Xdefaults is one of the many ways to set window decorations or resources. Look at the man page for hpterm and you'll see the dozens of options and resources that can be set. They can be set generically for every window or they can be set for a window that has a specific title. man X is a start but a good book on Xwindows will also be worthwhile.
Bill Hassell, sysadmin
echo "*loginShell: true" >> $HOME/.Xdefaults
Now terminal emulators such as hpterm, xterm or dtterm will login as expected and will have the same profiles as a telnet connection. You can also add additional resource settings for the emulators or other Xwindow applications. For example, the contents might look like this:
*loginShell: true
HPterm*scrollBar: true
HPterm*saveLines: 10s
HPterm*background: navy
HPterm*foreground: white
Xterm*background: darkslateblue
Xterm*foreground: white
Xterm*saveLines: 10s
Xterm*scrollBar: true
Dtterm*saveLines: 10s
Dtterm*scrollBar: true
and after adding these lines to .Xdefaults, all hpterm, xterm and dtterm windows will have a scroll bar plus 10 screens (800 lines) of history. hpterm will have a dark blue with white letter color scheme while xterm will have a more gray-blue background with white letters. dtterm will match the overall CDE color scheme.
.Xdefaults is one of the many ways to set window decorations or resources. Look at the man page for hpterm and you'll see the dozens of options and resources that can be set. They can be set generically for every window or they can be set for a window that has a specific title. man X is a start but a good book on Xwindows will also be worthwhile.
Bill Hassell, sysadmin
- Tags:
- .Xdefaults
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP