HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.



Sajjad Sahir
Honored Contributor

Re: Password Issue


the same user what asked old passwd

that one try first

by using this command

passwd -df new122


then open another terminal session
try to enter the user which one u forgot the passwd

thanks and regards

Sajjad


R.K. #
Honored Contributor

Re: Password Issue

Hi UniRock,

Are you creating a NEW user with UID 0.....or this is an OLD/existing user??
Don't fix what ain't broke
Ganesan R
Honored Contributor

Re: Password Issue

Hi,

Never create a user with uid 0.

Think if you remove the user later point of time along with user owned files delete option. It delete all the root owned files as well.

So it is not recommanded to have user with uid 0
Best wishes,

Ganesh.
Suraj K Sankari
Honored Contributor

Re: Password Issue

Hi,

After deleteing the * save the file
give passwd test

Suraj
UniRock
Regular Advisor

Re: Password Issue

Hello All,

Removing * from below line solved the issue :)
u_pwd=*:\ <<<======

Actually first I tried this and failed.
u_pwd= :\ <<=== space before colon

Later, I tried this and succeeded.
u_pwd=:\ <<<==== no space before colon.


================================
Thanks all of you specially Suraj and Avizen.

Sometimes, along with the soluton, we require advice also.
Thanks Ganeshan for your valuable suggestion.

================================
Jestin John Chacko
Regular Advisor

Re: Password Issue

Dear
Really a useful solution for me too .Thanks