Problem with passwd and shadow files
Hi all!
Yesterday I was working with a perl module to change users password, but I don't know what happened, now the default file to store/read passwords is 'passwd' file instead 'shadow' file. How can I set the 'shadow' file as the default file to store/read passwords? Thanks! |
If you have the authconfig utility you can run:
Code:
authconfig --useshadow --update |
Quote:
I don't have authconfig, I'm on Debian. The perl module was working fine, but I don't know what happened. Thanks! |
The question we need to answer is "What happened?" .. can you give us the name of the module?
|
Quote:
Code:
my $pw = new Unix::PasswdFile "/etc/shadow"; Code:
$pw->passwd( $username, $pw->encpass($pass_new) ); |
I see no reference to shadow support in http://search.cpan.org/dist/Unix-Con.../PasswdFile.pm
Did you take a backup before you started playing? |
Quote:
I read other module reference that supports shadow. If I install authconfig with 'alien'. Could it works? And no, I don't have backup. Thanks. |
You don't need authconfig, you just need to fix the entries in your /etc/passwd file. *Theoretically* you may just need to fix the passord fields for any accounts you modified by replacing any content with an 'x', this tells shadow aware tools that the password is stored in /etc/shadow. Once complete perform a password change for any affected accounts.
|
Quote:
|
I solved my problem, I used the shadowconfig command with parameter 'on':
Code:
shadowconfig on |
All times are GMT -5. The time now is 11:51 PM. |