Password Access

Password Access

Post by John Kouli » Tue, 20 Feb 2001 21:57:37



Hello there,

This is my question :

Does anybody know if there is a way to regenarate my shadow passwords file
using the normal passwd file.
I want to do this simply because my  'shadow' file is corrupted. But the
normal file 'passwd' is OK.

Bye

 
 
 

Password Access

Post by Mark Po » Wed, 21 Feb 2001 13:25:27




-snip-

Quote:>Does anybody know if there is a way to regenarate my shadow passwords file
>using the normal passwd file.
>I want to do this simply because my  'shadow' file is corrupted. But the
>normal file 'passwd' is OK.

Well, since the installation process of the shadow password suite removes
all the passwords from /etc/passwd (actually it replaces them with an 'x'),
I would have to say no.  You don't have a backup?

Mark Post

Postmodern Consulting
Information Technology and Systems Management Consulting
To send me email, replace 'nospam' with 'home'.

 
 
 

Password Access

Post by Travis Case » Wed, 21 Feb 2001 13:58:34



> Hello there,

> This is my question :

> Does anybody know if there is a way to regenarate my shadow passwords file
> using the normal passwd file.
> I want to do this simply because my  'shadow' file is corrupted. But the
> normal file 'passwd' is OK.

It should be possible to create a new shadow file, but you won't be
able to regenerate the old one -- the shadow file has information that
isn't in the passwd file, so you can't get back what was lost from it.

First things first, you'll want to check the format of your shadow
file.  There are multiple shadow password packages out there, so
the format of mine may not be the same as the format of yours.

On my system, there's a manpage that describes the format of the
shadow file in section 5.  You can see if yours has one by doing:

man 5 shadow

Most shadow files are set up the same way the password file is:
as a text file with one record per line, and with fields separated
by colons.  One of the fields will be the password field.  You can
start off by making the password blank for all users -- MAKE SURE
THAT YOU ARE OFF THE NETWORK WHILE YOUR MACHINE IS LIKE THAT.  Sorry
to yell, but I'd hate to see you get cracked while having empty
passwords...

Once you've got that shadow file built with empty passwords, you
should be able to log in as root (as long as nothing else is too
badly damaged, at least).  You can then use the passwd command to
set passwords for those accounts that you know the passwords for.
For any other accounts, put a * in the password field in the
shadow file -- that will disable logins for that account.

That should do it.  I recommend that while you've got the machine
offline, you also look around for evidence of a break-in -- I'd
find it suspicious that the shadow file was corrupted, myself.  It
might be a cracker trying to cover his/her tracks.

--

 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-'
     '---''(_/--'  `-'\_)

 
 
 

1. Password access to script directory?

I have directory in which I run a script.

If I password protect the script directory with .htaccess, my script
asks the user for a User ID and password.

How can I modify .htaccess so that the script can accessed its own
password protected directory?

I could use Options ExecCGI in my .htaccess file, but then I can't
access the directory from a Web browser with an ID and password (which
I want to do for maintenance).

Ian

2. default route with PPP

3. Need ftpd w/support for password-access to individual dirs.

4. Help me for PPP connection

5. Apache 1.30 | password access question

6. Nasty little network problem

7. Password Access

8. Q1: user...

9. Password access and reverse proxies

10. Enterprise Server Password Access

11. password access

12. Apache, NT password, access control

13. password access