1748242 Members
4276 Online
108760 Solutions
New Discussion юеВ

Re: Password Issue

 
SOLVED
Go to solution
UniRock
Regular Advisor

Password Issue

Hi All,

I am trying to create a new user "test" UID=0 from root. Following is what happens:

---------------------------------------
# useradd -o -u 0 -m -d /home/test test
# passwd test
Changing password for test
Old password:
Sorry.
---------------------------------------

Why is it asking for old password, when it is a 'brand' new user?
Is is because this is a trusted system?

Response is much appreciated.


Thanks..
UniRock

15 REPLIES 15
avizen9
Esteemed Contributor

Re: Password Issue

Hello UniRock

can you check your /etc/passwd file the test user already exist?

if it not exist please update /etc/passwd file with below line and then on command prompt type passwd test to reset password.

test::0:0:test user:/test:/bin/bash

let me know how it goes, thanks,
UniRock
Regular Advisor

Re: Password Issue

Hi Avizen,

It exists already..
test:*:104:20::/home/test:/sbin/sh

Shall I modify it and try?
UniRock
Regular Advisor

Re: Password Issue

Sorry,
It was:

test:*:0:20::/home/test:/sbin/sh
Suraj K Sankari
Honored Contributor
Solution

Re: Password Issue

Hi,

open this file /tcb/files/auth/t/test


test:u_name=test:u_id#0:\
:u_pwd=encrypted_password:\
:u_minchg#0:u_pickpw:u_nullpw:u_restrict@:\
:u_maxtries#100:u_lock@:chkent:

delete all cherecter after "=" sign on this line after deleteing this look like the below line
u_pwd= :\

save the file

try with "passwd test"

now it will not ask the old passwd
Suraj
UniRock
Regular Advisor

Re: Password Issue

Hi Suraj,

The file looks like:

test:u_name=test:u_id#0:\
:u_pwd=*:\ <<<======
:u_auditid#16:\
:u_auditflag#1:\
:u_unsucchg#1242269911:u_suclog#1242269865:u_lock@:chkent:


avizen9
Esteemed Contributor

Re: Password Issue

can you remove * also and then try, please take backup for this file before modify anyting, thanks,

u_pwd=*:\ <<<======


UniRock
Regular Advisor

Re: Password Issue

Still no luck.....same results :(
Sajjad Sahir
Honored Contributor

Re: Password Issue

Dear Friend
what about u system is it trusted or not trusted. if it is trusted

do the following

passwd ├в df userid.

once u entered this command next time user login will ask new passwd only

thanks and regards

Sajjad Sahir
UniRock
Regular Advisor

Re: Password Issue

Hi Sajjad,

UserId is 0....as i am trying to create another user with root powers.

Still if I use the command, I get:

# passwd -df 0

Password cannot be changed. Reason: Cannot access protected password entry.