passwd command search


 
Thread Tools Search this Thread
Operating Systems Solaris passwd command search
# 1  
Old 06-18-2007
passwd command search

Hi.

When i execute
which passwdit is showing /usr/bin/passwd, eventhough i set my path as

PATH=/etc:$PATH

i just checked the permission for the passwd under /usr/bin

-r-sr-sr-x

what exactly happening? and what is that s signifies

Thanks.
# 2  
Old 06-18-2007
are you root ot normal user ? are you sure that you set the $PATH in correct file ? /etc/bashrc or your home folder ?
Quote:
export PATH=$PATH:/etc:$PATH
or
Quote:
For tcsh or csh:
set PATH = ($PATH /usr/sbin /usr/local/bin)
# 3  
Old 06-18-2007
Thanks for reply, i am a normal user and my shell in korn shell. I am working under SunOs5.9

Thanks.
# 4  
Old 06-18-2007
Hi,
Code:
$ ls -l /etc/passwd
-rw-r--r--    1 root     root         1395 Jun  9 20:15 /etc/passwd

Here /etc/passwd is a file which has read-write access only root user.This file contains the encrypted password details.
Code:
$ ls -l /usr/bin/passwd
-r-s--x--x    1 root     root        16336 Feb 14  2003 /usr/bin/passwd

The /usr/bin/passwd is the set-uid program,which enable normal users to accomplish tasks which would otherwise require privileged access.Whenever this program is run it will run with root user privilege.

Thus the passwd program allows normal users to change password,which requires ability to write to /etc/passwd file.


Thanks
Nagarajan Ganesan.
# 5  
Old 06-19-2007
Thanks Nagaraj for your explanation

is there any situation we need to go for set uid? then what is the purpose of set gid?
clear me with some more examplesSmilie

Thanks.
# 6  
Old 06-19-2007
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

2. Solaris

passwd command validation

hi Actually the normal user as the permission of executing the passwd command due to suid program... eg consider the two users (normal user) as tom & jerry! when tom executes command as " passwd tom" no issue here... In the same way when the same user tom uses the command as "passwd jerry" ... (1 Reply)
Discussion started by: sriniv666
1 Replies

3. Shell Programming and Scripting

passing passwd to a command in a script

Hi All, I have a requirment.. I need to pass a registry password to a command.. Actually when the command executed in the script, it will return some warnings first, then after it'll ask password like below, $ cleartool rmtag -vob -all <vob_name> Warnings: ------------------ Registry... (3 Replies)
Discussion started by: raghu.iv85
3 Replies

4. UNIX for Dummies Questions & Answers

passwd command what is the meaning

Hello to everybody i have question i do the passwd -s -a commando and what to knos what is the meaning of the second row. PS NL LK to the side is the date of expiraton and then a 7 a 90 what is the meaning of all that? tHANK YOU FOR YOUR TIME. (1 Reply)
Discussion started by: enkei17
1 Replies

5. Emergency UNIX and Linux Support

Passwd command problem

on Runnning passwd command on HPUX 11.23 I am getting pam_chauthtok: Shared object load failure. Pls help ... (13 Replies)
Discussion started by: ultimatix
13 Replies

6. UNIX for Dummies Questions & Answers

Passwd command not working

on Runnning passwd command on HPUX 11.23 I am getting pam_chauthtok: Shared object load failure. Pls help ... (1 Reply)
Discussion started by: ultimatix
1 Replies

7. Linux

how to get passwd command again if it is deleted by usin rm command

hai friends i have deleted passwd command using rm command i thought it will come again at the time of rebooting but it is completely deleted how to get it worked again (5 Replies)
Discussion started by: venkata.ganesh
5 Replies

8. Shell Programming and Scripting

Unix Script to search user id in /etc/passwd

Hey all, i have to write a script in Unix that would help me in my department to search certain user ids valid in /etc/passwd file.. here goes the exact question & data to help analyze: Amend a script to tell the user to enter a user id to be searched for in the /etc/passwd file. If there are no... (7 Replies)
Discussion started by: ally_d
7 Replies

9. Shell Programming and Scripting

Passwd in the line command

Friends, a help I need to do a script in the following way #!/bin/ksh passwd="us45#9ii" su - orapdr -c "sqlplus system/$passwd @verif_tbs.sql" When and executed in the line cmd is this way orapdr 2093232 1 0 Aug 21 - 52:02 sqlplus system/us45#9ii @verif_tbs.sql... (1 Reply)
Discussion started by: sandba
1 Replies

10. UNIX for Dummies Questions & Answers

passwd command not working

Hello All, I am working on Sco unix version 5.0.5. The passwd command has somehow got corrupted and is only displaying the contents of the /etc/passwd file instead of changing the password. I wanted to know if there is any other command through which you can change the password of a user from... (5 Replies)
Discussion started by: rahulrathod
5 Replies
Login or Register to Ask a Question