Operating System - HP-UX
1753797 Members
7852 Online
108799 Solutions
New Discussion юеВ

Re: understanding /etc/passwd.

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Re: understanding /etc/passwd.

For example /etc/passwd file is

1)root:3Km/o4Cyq84Xc:0:10:System Administrator:/:/sbin/sh

2)joe:r4hRJr4GJ4CqE:100:50:Joe User,Post 4A,12345:/home/joe:/usr/bin/ksh

Here the second field contains encrypted password in both the entries.

That is some passwords (real words with letters) are converted as Encrypted password and entered here in second filed.

So I am asking that how to creata a real password as encrypted password?
Avinash20
Honored Contributor

Re: understanding /etc/passwd.

Hi,

root:3Km/o4Cyq84Xc <<--

The password is in encrypted.

The idea behind changing the system to trusted or creating a shadow password is to change the location of /etc/passwd.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: understanding /etc/passwd.

"So I am asking that how to creata a real password as encrypted password?"

Good question..

But it is not possible, since when you provide the password, lot of algorithm gets executed and hence the above encrypted password gets generated.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: understanding /etc/passwd.

How about assigning some points :)
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
senthil_kumar_1
Super Advisor

Re: understanding /etc/passwd.

Is it possible that some lines have "*" and others have "encrypted password"?

Ex: /etc/passwd

1)
cmurphy:*:200:21:C.C.Murphy,US HQ,6588,:/home/murphy:/bin/ksh
2)klabunde:*:252:28:M.C.Klabunde,,,:/home/klabunde:/bin/ksh
3)pwrchute:zf67.sLB9vFPE:257:10:PowerChutePlus,,,:/home/pwrchute:/bin/ksh
4)
weber:*:277:32:D.M.Weber,eds,,:/home/weber:/bin/ksh
5)
mckeen:xQUDOfLwcnNB6:338:36:C.A.McKeen,EMD LMC,,:/home/ccm/home/mckeen:/bin/ksh
6)
ktieman:4Py4ttQiGGxo.:365:36:Ken Tieman,EMD LMC,,:/home/ktieman:/bin/ksh
7)
dandawat:xVUyMpkuSeWUY:399:21:Y Dandawate,,,:/home/pz2tl1:/bin/ksh
James R. Ferguson
Acclaimed Contributor

Re: understanding /etc/passwd.

Hi Senthil:

> So I am asking that how to creata a real password as encrypted password?

# cat mypwgen
#!/usr/bin/perl -l
die "One arg expected\n" unless @ARGV;
print crypt(
$ARGV[0],
join( '',
( '.', '/', 0 .. 9, 'A' .. 'Z', 'a' .. 'z' )[ rand 64, rand 64 ] )
);
1;

...run as:

# ./mypwgen plaintextpw

...the output will be an encrypted password suitable for use with 'useradd'.

Regards!

...JRF...
Avinash20
Honored Contributor

Re: understanding /etc/passwd.

Yes,

Convert the system into Trusted

# /usr/lbin/tsconvert

Password will be in *

Then untrust it

# /usr/lbin/tsconvert -r

Then change the password of any user.

Only for the above user the password will be in encrypted format.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
senthil_kumar_1
Super Advisor

Re: understanding /etc/passwd.

what is the default system "shadowed" or "trusted"?
James R. Ferguson
Acclaimed Contributor

Re: understanding /etc/passwd.

Hi:

Be advised that the Trusted system implematation is deprecated at 11.31 and will not be supported thereafter. You should consider converting to an '/etc/shadow' implementation.

If you are running on 11.11, you can install:

http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=ShadowPassword

If you are running 11.23 or 11.31, no additional software needs to be installed.

Chapter-8 of this guide discusses this:

http://docs.hp.com/en/B2355-90950/index.html

Regards!

...JRF...
Avinash20
Honored Contributor

Re: understanding /etc/passwd.

what is the default system "shadowed" or "trusted"?

Neither. By default the system will come with normal /etc/password having encrypted password.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."