1827801 Members
2322 Online
109969 Solutions
New Discussion

Change location password

 
Gabriele FACCHINI
Frequent Advisor

Change location password

Hi all,
can i to change location of the passord to another file unless start trusted system?
Thanks for your interest.
Gabriele
Gabriele Facchini
8 REPLIES 8
John Carr_2
Honored Contributor

Re: Change location password

yes you can but why ?

you cold do this

cp passwd passwd.old
mv passwd /tmp/passwd
ln -s /tmp/passwd passwd

the password now resides in the tmp directory but is still seen by programs to be in the /etc directory

john.
Gabriele FACCHINI
Frequent Advisor

Re: Change location password

Is it possible to move only the password to another file and leave the other information in the passwd file?
Gabriele Facchini
John Carr_2
Honored Contributor

Re: Change location password

Hi

moving the encrypted password from the password file is exactly what making the system trusted does with it.

the password file is readable so people copy them to other serves and run crack to gain password.

trusted systems have password in file which can only be read by root - stops problem.

John.

John Carr_2
Honored Contributor

Re: Change location password

Hi

of course if you just which to extract the password and put it into another file you can do

cat passwd awk -F: '{ print $2}' > /tmp/filename


john.
Gabriele FACCHINI
Frequent Advisor

Re: Change location password

I have HP-UX 11.0, and I want, if it is possible, to change location only of the password, unless to activate trusted system.
thanks.
Gabriele Facchini
Steve Lewis
Honored Contributor

Re: Change location password

It sounds like you don't want trusted mode, but still want to move your encrypted password out of /etc/passwd.
Access to lines in the password file are made using system calls such as getpwent(), see man getpwent.
I don't think you will be able to change the /etc/passwd file format because of the restrictions of these calls, which are part of the HP-UX o/s source. I know, since I have had to maintain the source to programs login/su/passwd myself. These programs use getpwent().

You are therefore restricted to HPUX trusted mode or HPUX 'normal' with the given file format.

You may still want to investigate PAM or Pluggagle Authentication Modules.
harry d brown jr
Honored Contributor

Re: Change location password

Gabriele,

If you don't make your system "trusted" then you CAN NOT just move the "passwords" out of the /etc/passwd file. If you remove those password entries in your /etc/passwd file, then those users for which you modified will not be able to ever login again.

Are you concerned about someone running the "crack" program? If you are, then I suggest you keep all users out of shells and in their applications.

Otherwise you should convert to a trusted system.


live free or die
harry
Live Free or Die