Operating System - HP-UX
1833784 Members
2538 Online
110063 Solutions
New Discussion

execution of passwd command in users profile

 
Rochelle Menezes
New Member

execution of passwd command in users profile

Hi,

On my HP-UX machine details of machine
"HP-UX ELX-LPU-IVM1 B.11.23 U ia64 0484773515 unlimited-user license"

I have my user id (username :test1) created. Now once I login I want to run the '$passwd' command and change my password but it say "sh: passwd: Execute permission denied."

On my other system it works. How do I solve this.

Ryan
Gust Keep Going
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: execution of passwd command in users profile

What are the permissions and ownership for /usr/bin/passwd?

And for that matter, check that you're actually getting the /usr/bin/passwd: whence passwd.


Pete

Pete
Dennis Handly
Acclaimed Contributor

Re: execution of passwd command in users profile

Why would you ever want this in your .profile?
It seems doing it manually would be best. Possibly echoing a reminder at the end of .profile.
Bill Hassell
Honored Contributor

Re: execution of passwd command in users profile

> I want to run the '$passwd' command

Did you really mean to say $passwd? In standard shells, $passwd will not run the passwd command. Instead, it will see $passwd as a variable name and replace $passwd with the current contents of the passwd variable (whatever that might be).

If you want to run any command from .profile (or any script), simply use the command's name, or better yet, specify the full pathanme as in:

/usr/bin/passwd


Bill Hassell, sysadmin
Rochelle Menezes
New Member

Re: execution of passwd command in users profile

Hi Guys,

Thanks.. Its done..

I have given this permissions yesterday night and it worked.

output atached.

Many Thanks Guys..don't know how it work but it works.

Cheers
Ryan
Gust Keep Going