- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SAM command problem
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-15-2003 04:58 AM
09-15-2003 04:58 AM
SAM command problem
I have HP-9000 E-class server,which has kept idle for some reasion.I don't know how my earlier system administrator configured, but recently when started the server to check.I have observed one thing ie., SAM command is not working with "root" login.But i have one more Login for my application purpuse.If i login with that login and from there i am entering into root user login by using "SU" command then i am able to run SAM command.Even though this user is not belong to root user or group.
Can any body tell me what colud be the problem?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:03 AM
09-15-2003 05:03 AM
Re: SAM command problem
What you get as output when you try to run SAM. Is /usr/sbin in root's PATH.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:06 AM
09-15-2003 05:06 AM
Re: SAM command problem
THe only difference between the two, at least as far as SAM knows, is that logging in as root runs .profile so it would be worth looking into that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:18 AM
09-15-2003 05:18 AM
Re: SAM command problem
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:34 AM
09-15-2003 05:34 AM
Re: SAM command problem
When i run SAM command from command prompt i am getting the following error
"sh: sam: not found."
for second thing PATH,i haven't seen /usr/sbin path by using "SET" command.
I hope with this input you might understand my problem.
Thanks and regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:39 AM
09-15-2003 05:39 AM
Re: SAM command problem
Lets see what the environment on this box is. I don't even know the SHELL, the version of HP-UX anything. I've worked with E boxes, but you could be running HP-UX 9.04 or something.
uname -a
Will tell us something about the system.
I'm more useed to root having the SHELL it has now, posix.
Its certain that there is no or little PATH value, but the SHELL might be messed up in /etc/passwd as well.
If it exists on your system, pwck and grpck commands will validate this most important data file.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:18 AM
09-15-2003 06:18 AM
Re: SAM command problem
it sounds as if your root user has very little in his PATH - and your "other" user has more; when you make your first login as the "other" user, I assume that some variables are set and exported, e.g. PATH.
If you then change user to root in a way that does not overwrite the variables set in the first users shell, you simply take over what is exported from there. This is probably the reason why root cannot find sam when logged in directly.
Please try to execute this:
# echo $PATH
a) when logged in directly as root
b) when logged in as the other user
c) after changing user to root.
A guess is that b) and c) will show more than a).
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 09:21 PM
09-15-2003 09:21 PM
Re: SAM command problem
I guess the difference lies in the .profile file. The other user that u r using right now, must have set the PATH variable in the .profile.
Try logging in as the root user and at the shell prompt
1)export PATH=$PATH:/usr/sbin and then invoke sam or
2) Invoke sam by giving the full path /user/sbin/sam or
3) In the .profile of the root user, add the line
export PATH=$PATH:/usr/sbin
Then logout and login and then try invoking sam.
Before invoking sam, just give echo $PATH and see whether it actually has /usr/sbin .
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 10:51 PM
09-15-2003 10:51 PM
Re: SAM command problem
This only PATH problem try to set the PATH through SET command. otherwise match application user .profile with superuser .profile
bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 12:36 AM
09-17-2003 12:36 AM
Re: SAM command problem
As per your feed back i am giving some points as follows.
i)the o/p of uname -a is
HP-UX myhp B.10.20 E 9000/826 8-user license
ii)for pwck and grpck commands there is no error regarding root user login
iii)The o/p of #ehco $PATH is
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/pd/bin:/opt/upgrade/bin:/opt/langtools/bin:/opt/imake/bin:/opt/hparray/bin:/opt/pred/bin:/opt/perf/bin
for the other user $echo $PATH o/p is
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/pd/bin:/opt/upgrade/bin:/opt/langtools/bin:/bin/imake/bin:/opt/hparray/bin:/opt/pred/bin:/opt/perf/bin:/usr/xmhs/cxa/bin:.:/bin:/usr/bin/:/usr/xmhs/bin:/etc:/usr/fmc/bin:/usr/lib/uucp:
iv)for root user i din't find the .profile file in home directory.But one more file i have named .profile.0209 .
v)I am able to run sam command while in root user login by using /usr/sbin/sam.
As per above please advise me how to go about the problem.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 12:58 AM
09-17-2003 12:58 AM
Re: SAM command problem
It looks like "sam" has a symbolic link in somewhere ( and its path is included in the PATH of the other user, but not in root user).
Try to find all "sam" files with "find" command.
Also add "/usr/sbin/" to the PATH of root user.
Hope this helps.
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 01:11 AM
09-17-2003 01:11 AM
Re: SAM command problem
it is a bit strange that you do not have a .profile for the root user, but I guess there could be reasons for that. Among other things, the root .profile often holds a line that adds /usr/sbin to the general PATH, e.g. like this:
PATH=/usr/sbin:$PATH
You could try to include only the above line in the .profile for the root user, or alternatively, include "/usr/sbin" in /etc/PATH
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 02:52 AM
09-17-2003 02:52 AM
Re: SAM command problem
You can do one of the following
1. Create a .profile file and add the line
export PATH=$PATH:/usr/sbin
then at the prompt type . ./.profile (dot space dot slash dot profile) and then try invoking sam
2. Just export the path variable at the command prompt and invoke sam. export PATH=$PATH:/usr/sbin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:15 AM
09-17-2003 03:15 AM
Re: SAM command problem
As per John's reply,i did the same thing like i have created .profile file in root's home diredtory ie., "/" and set the path for /usr/sbin then i exported same path.After that i have logout and login as root.By using #echo $PATH.The o/p is showing new path ie., /usr/sbin.
Now i am able to run SAM Command without having any error.atlost my problem got solved.
But i am not uderstanding with having .profile file in user's home directory how the PATHs are effecting.
Thanks to every body for advising me to sort out my problem.
Thanks and regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 03:31 AM
09-17-2003 03:31 AM
Re: SAM command problem
as Zigor already has indicated, the "additional" PATH of the other user:
:/usr/xmhs/cxa/bin:.:/bin:/usr/bin/:/usr/xmhs/bin:/etc:/usr/fmc/bin:/usr/lib/uucp:
holds somewhere a link to /usr/sbin/sam. You can try to go into each of these directories and check for links.
The far out possibility is that the other user's home dir is/usr/bin (his PATH includes the dot char, meaning look in current directory) - but I hope it is too far out.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 04:00 AM
09-17-2003 04:00 AM
Re: SAM command problem
During login, after authentication is done, the /etc/profile is first executed followed by $HOME/.profile. .profile is used to the environment for a particular user while /etc/profile sets up for all users across the system.
The roots .profile sets /usr/sbin as the first PATH since most of the commands used by root is there and should be executed from /usr/sbin.
HTH,
Umapathy