The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to get passwd command again if it is deleted by usin rm command venkata.ganesh Linux 4 06-11-2007 01:18 PM
Passwd in the line command sandba Shell Programming and Scripting 1 08-22-2006 08:33 AM
How do I parse passwords into passwd command. gilberteu Shell Programming and Scripting 0 03-28-2006 08:26 AM
passwd command not working rahulrathod UNIX for Dummies Questions & Answers 5 12-09-2004 12:46 PM
comparable command in OpenBSD for linux's "passwd -l (name)" xyyz BSD 1 09-11-2003 04:08 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-18-2007
Registered User
 

Join Date: Jul 2005
Posts: 24
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.
Reply With Quote
Forum Sponsor
  #2  
Old 06-18-2007
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,200
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)
Reply With Quote
  #3  
Old 06-18-2007
Registered User
 

Join Date: Jul 2005
Posts: 24
Thanks for reply, i am a normal user and my shell in korn shell. I am working under SunOs5.9

Thanks.
Reply With Quote
  #4  
Old 06-18-2007
Registered User
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
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.
Reply With Quote
  #5  
Old 06-18-2007
Registered User
 

Join Date: Jul 2005
Posts: 24
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 examples

Thanks.
Reply With Quote
  #6  
Old 06-19-2007
Registered User
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
Please see the thread,

Unix File Permissions
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0