I am using ubuntu system which uses openldap for user login authentication. For changing my login password i used "$sudo passwd" and changed it. (of course the password given is same as old one). Then onwards when i trying to run "apt" command it showing command not found. and for some other programs it showing segmentation fault. Can any one tell me why I am facing issue and how to solve this.
I am pretty sure it is unrelated to you changing password.
You either did something more, or it is just coincidence with some other problem.
You changed which password?
sudo passwd changes root's password, not yours.
And there is no command called apt. It's
Unless you have an alias
alias apt=apt-get. Whether that works with sudo will depend on which file you put the alias in.