- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- expect and who -m
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
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
тАО04-09-2003 01:32 PM
тАО04-09-2003 01:32 PM
expect and who -m
I'm trying out expect and having a bit of a headache. Expect 5.38.0, HP-UX 11i.
I'm using something like:
...
spawn /bin/su - joeuser
expect "Password:" { send "Big_Secret\r" }
...
But when I get to the /etc/profile, who -m does not work! Any ideas? This becomes important as who -m indicates the inital login user (regardless of su), and I've got some scripts which rely upon this for security.
who -m returns exactly nothing. Normal who works.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2003 01:46 PM
тАО04-09-2003 01:46 PM
Re: expect and who -m
$ who am i
Does that return anything at all ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2003 02:10 PM
тАО04-09-2003 02:10 PM
Re: expect and who -m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2003 02:14 PM
тАО04-09-2003 02:14 PM
Re: expect and who -m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2003 07:34 PM
тАО04-09-2003 07:34 PM
Re: expect and who -m
>/var/adm/wtmp
Right permissions?
644
If not there:
touch /var/adm/wtmp
See 'man last' or finger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2003 07:49 PM
тАО04-09-2003 07:49 PM
Re: expect and who -m
I guest you can remove it and add it back.
# rm /etc/utmp
# touch /etc/utmp
make sure the permission in this file are correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2003 05:48 PM
тАО04-15-2003 05:48 PM
Re: expect and who -m
set -- $(who -Rm)
als check your /etc/profile, if there is any neat tricks to kick you out if you don't come in from a regular tty or console.
I'll check this thread back later. might have a solution for you. not at the office now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2003 05:23 AM
тАО08-21-2003 05:23 AM
Re: expect and who -m
who -mTR > /dev/null
if [ $? -ne 0 ]
then
who -mTR
else
echo make up some values
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2003 05:24 AM
тАО08-21-2003 05:24 AM
Re: expect and who -m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2003 09:25 AM
тАО08-21-2003 09:25 AM
Re: expect and who -m
it has been tested and it works.