psswd&shadow 2 passwd together?!!


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users psswd&shadow 2 passwd together?!!
# 1  
Old 09-20-2011
psswd&shadow 2 passwd together?!!

hi, all
I just started on new box where I have to diff passwd working perfectly on the very same account/user. I see that shadow was added recently (I'm not a root in there), I see 'x' in passwd. Not sure how it should work, should I change old passwd for one defined in shadow? Or it's fine to have 2 of them, or it's a bug?

It's RHat 5 Ent Linux.


Tx
T
# 2  
Old 09-21-2011
you don't need to edit /etc/shadow directly. The passwords are stored here for security reasons as /etc/passwd needs to be world readable.
# 3  
Old 09-21-2011
/etc/passwd used to contain actual hashed passwords -- readable by any user on the system! At the time, crypt() was (intentionally) too slow for a brute-force search(feeding every dictionary word times every possible salt into crypt() until you get the same hash) to be practical, and this worked for a while, but eventually CPU's got fast enough that brute-forcing a hash became possible.

So they moved the password hashes into /etc/shadow, which nobody but the login system can read. They kept the rest of the data in /etc/passwd.

Modern systems also often use better hashing algorithms than crypt().
# 4  
Old 09-21-2011
Thansk,
but do we have to have 2 diff password for system ? Now I can login using both of them.

Tx
T
# 5  
Old 09-21-2011
No. Password hashes aren't stored in /etc/passwd at all anymore, just an 'x' meaning 'this user has a password in /etc/shadow', or perhaps some other string meaning 'this user is disabled'. Nothing else is valid.
# 6  
Old 09-21-2011
YEs, so it's some kind of bug. Now I can use 2 passwords for the same account.

T
# 7  
Old 09-21-2011
How long are the passwords? Many systems ignore everything after the first eight letters(another legacy of UNIX crypt).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Supress the psswd from ps in ksh/bash

I am running the ETL job to passing the database username,pssswd positional arguments to shell script (bash) and how can we suppress/hide the password from ps command. (2 Replies)
Discussion started by: pimmit22043
2 Replies

2. Solaris

Passwd -l or -u modifies lastchg field in /etc/shadow file

Hi, I have a Solaris 10 box where password aging is not functioning properly. Using the passwd command with the -l or -u options causes the lastchg field in the /etc/shadow file to be modified. Therefore, if a user's password is set to expire in 90 days and they are 1 day away, all they have... (4 Replies)
Discussion started by: cschar
4 Replies

3. Solaris

Passwd,shadow files deleted and abort sequence disabled

Hi all.. I moved the /etc/shadow and /etc/shadow files to /tmp and then rebooted my PARC machine running 5.10. I did it to see if I could recover from single user mode. But, I forgot to enable the abort key-sequence which I earlier disabled. Stuck! One of my gurus told I had to... (9 Replies)
Discussion started by: satish51392111
9 Replies

4. Solaris

difference between /etc/shadow and /etc/default/passwd

Hi , can anyone explain me the difference between /etc/shadow and /etc/default/passwd . As per my knowledge both the files are used for password aging and control parameters. (2 Replies)
Discussion started by: rogerben
2 Replies

5. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

6. UNIX for Advanced & Expert Users

Converting freebsd (5.2.1) master.passwd to Debian shadow

I'm trying to make this work, and it half works. Accounts with password hashes matching the old crypt(3) algorithm work just fine: JUpfW/w6jo6aw But accounts with longer password hashes preceded by $1$, such as the following, do not work: $1$iIcbppdP$HDyjJeVMGgJ.ovLsnjtTR.... (0 Replies)
Discussion started by: davidstvz
0 Replies

7. Solaris

tool to convert /etc/passwd and etc/shadow

i wonder if there is a tool to read the /etc/passwd or /etc/shadow files in order to reset user accounts to the same one. By moving (restore) all filessytem and data to another same Sun box, none of the users are able to logon to the new box which i didn't change nothing. But if i reset the user... (1 Reply)
Discussion started by: lamoul
1 Replies

8. UNIX for Dummies Questions & Answers

How to : Identify the the password is encrypted or not in /etc/shadow or /etc/passwd?

Thanks AVKlinux (11 Replies)
Discussion started by: avklinux
11 Replies

9. UNIX for Dummies Questions & Answers

is it really not possible for me to edit the etc/group & the etc/passwd files?

From what I have read it possible to create a new group by editing the etc/group and etc/passwd in UNIX two files but a non-experienced user may face many problems such as destroying the file by mistake ot that his changes to these file does not make any difference. However, there is this... (2 Replies)
Discussion started by: whatev3r
2 Replies

10. UNIX for Dummies Questions & Answers

nobody & noaccess entries in passwd file

Hi, I cud find entries for user's named nobody and noaccess in the passwd file in the Unix system in which I am working ... I have seen entries for these in other systems too .... What is the significance for nobody and noaccess ... ?? Anything special ?? Can anyone help ?? Thanks &... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies
Login or Register to Ask a Question