- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: auto logout
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
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
05-15-2009 10:12 AM
05-15-2009 10:12 AM
Re: auto logout
UNIX because I majored in cryptology...
- Tags:
- shells
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 10:18 AM
05-15-2009 10:18 AM
Re: auto logout
I dodn't see any file called /etc/shells in my installation.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 11:58 AM
05-15-2009 11:58 AM
Re: auto logout
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
you have to create an /etc/shells and add all shells used by users of the system (you can derive this by running "cat /etc/passwd|cut -d: -f 7|sort|uniq" command) as well as your non-standard shell.
Try it and see if it makes a difference. If it does not, you can always erase the /etc/shells file after the test.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 12:45 PM
05-15-2009 12:45 PM
Re: auto logout
Not working how? Have you added something in your script to detect it has even been executed?
BASE=$(basename $0)
LOG=/var/tmp/${BASE}.$$.log
echo "$BASE was executed on: $(date)" >> $LOG
exec /your/program
>Mel: I am not sure about this somewhere I remember reading, if you are going to assign a user a non-standard shell
Right. Typically this is only needed if you are going to use ftp for that user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 12:54 PM
05-15-2009 12:54 PM
Re: auto logout
Its a X -windows application...I don't see the application coming up. There is no need to build the log to check the status.
If I let the user open the shell and execute it...it works fine.. But If I call it as a startup program ( instead of some shell like /usr/bin/ksh), application is not appearing at all unless I add a line like /usr/bin/ksh as I have explained in my earlier posting.
Thanks for any help on this!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 01:13 PM
05-15-2009 01:13 PM
Re: auto logout
tail -f /var/adm/syslog/syslog.log
anything gets written over there ?
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2009 01:56 PM
05-15-2009 01:56 PM
Re: auto logout
The log was just to make sure the script was executed.
>Mel: when you look at last(1) output
No need to look at those if you have that log for the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2009 11:08 AM
05-18-2009 11:08 AM
Re: auto logout
>upon login. Which one is the case ?
I can see the logon entry in 'last'. But it doesn't display the Xwindows clock and logout itself. What to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2009 12:53 PM
05-18-2009 12:53 PM
Re: auto logout
export DISPLAY=$(who -muR | awk '{print $NF}'):0.0
BASE=$(basename $0)
LOG=/backup/Taxware/toolkit/${BASE}.$$.log
echo "$BASE was executed on: $(date)" > $LOG
/usr/bin/X11/xclock
Its executing the script as I can see the logfile..but clock is not appearing at all.
DISPLAY is not an issue...
Appreciate any help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2009 10:57 PM
05-18-2009 10:57 PM
Re: auto logout
>DISPLAY is not an issue.
Why do you think so?
Do you keep the script's stdout/stderr?
Is the script still running?
Here is why you have that logfile. You can echo $DISPLAY to that file.
And echo info after xclock finishes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 07:24 AM
05-19-2009 07:24 AM
Re: auto logout
#export DISPLAY=$(who -muR | awk '{print $NF}'):0.0
export DISPLAY=10.227.16.23:0.0
BASE=$(basename $0)
LOG=/backup/Taxware/toolkit/${BASE}.log
echo "$BASE was executed on: $(date)" > $LOG
/usr/bin/X11/xclock
echo "$BASE was executed on: $(date)" >> $LOG 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 08:19 AM
05-19-2009 08:19 AM
Re: auto logout
#export DISPLAY=$(who -muR | awk '{print $NF}'):0.0
export DISPLAY=10.227.16.23:0.0
What was the wrong value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 09:15 AM
05-19-2009 09:15 AM
Re: auto logout
What was the wrong value?
"
export DISPLAY=$(who -muR | awk '{print $NF}'):0.0 doesn't work.
export DISPLAY=10.227.16.23:0.0 is hardcoded and won't work for other users.
do we have anyway to capture IP address and put that in DISPLAY variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 09:44 AM
05-19-2009 09:44 AM
Re: auto logout
Again, what is the value of $DISPLAY for this case?
Does it work correct for a session?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 09:46 AM
05-19-2009 09:46 AM
Re: auto logout
its returning
ric2bptc21:0.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 10:08 AM
05-19-2009 10:08 AM
Re: auto logout
Any connection between ric2bptc21 and 10.227.16.23?
Can you try this by hand or logging:
who -mR
Is $DISPLAY already set correctly?
How about $TERM? (Some emulators may add it there.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 02:34 PM
05-19-2009 02:34 PM
Re: auto logout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 09:37 PM
05-19-2009 09:37 PM
Re: auto logout
See man page of who
-R Displays the userâ s host name. If the user is logged in on a tty, who displays the
string returned from gethostname() (see gethostname(2)). If the user is not
logged in on a tty and the host name stored in the /etc/utmp or named file has not
been truncated when stored (meaning that the entire host name was stored with no
loss of information), it is displayed as it was stored. Otherwise, the gethostbyaddr()
function is called with the internet address of the host (see
gethostent(3N)). The host name returned by gethostbyaddr() is displayed
unless it returns an error, in which case the truncated host name is displayed.
Suraj
- Tags:
- who
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2009 05:28 AM
05-20-2009 05:28 AM
Re: auto logout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2009 08:05 AM
05-20-2009 08:05 AM
Re: auto logout
who -muR is returning the IP address of the incoming host. You are apparently going through more than one system to get to the destination. Therefore, you can't use the who -muR method. Just hardcode your IP address like this:
export DISPLAY=12.34.56.78:0.0
Verify that it works with xclock. Then run your custom program.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2009 08:17 AM
05-20-2009 08:17 AM
Re: auto logout
In my case its returning the name of other desktop/laptop user machine randomely from the netwrok... Is it normal :-)
> Just hardcode your IP address like this:
Hardcoding IP won;t work as the script need to be executed by other users with different IP.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2009 02:24 PM
05-20-2009 02:24 PM
Re: auto logout
You need to describe all the machines in between your PC and the HP system. HP-UX knows the IP address of the machine that is directly connected. If you use several different machines, or you are using a networking tunnel, then you must supply the IP address of your PC as part of the login process. Whether there are two or twenty machines in your connection chain, there is no simple way to track down your PC's address.
Since you are using WRQ'a Reflection/X software, you have the ability to code the startup of your HP-UX program including setting the DISPLAY variable and passing it to the remote system. The above examples only work with a simple connection.
Bill Hassell, sysadmin
- « Previous
-
- 1
- 2
- Next »