Operating System - Linux
1826123 Members
5350 Online
109690 Solutions
New Discussion

meaning of the fields in /etc/shadow

 
SOLVED
Go to solution
Rod_13
Occasional Advisor

meaning of the fields in /etc/shadow

Hi all,
I know user2 and user3 have they password in /etc/shadow, but i think user1 is disabled, isn??t it?. But when i watch at /etc/shadow :

user1:$1$ggHyD5T$7RSEJYlrgBhfG25Y71bG1L0:12115:0:99999:7:::
user2:!!:12114:0:99999:7:::
user3:*:11988:0:99999:7:::

So, account for user1 and user3 are disabled or not? And finally, what??s the meaning of "!!" in the passwd field of /etc/shadow in user2?
How i can disable an account using /etc/shadow?

Best regards and Thxs in advance

Rod
"Try it, and if it doesn´t work...run!!"
4 REPLIES 4
Rod_13
Occasional Advisor

Re: meaning of the fields in /etc/shadow

Sorry, the previous message is not complete. This is the full question:

I have some questions about /etc/passwd & /etc/shadow. I have a system running Linux Red Hat 7.1 and in /etc/passwd I have some entries, i.e:

user1:*:192:100::/home/user1:/bin/bash
user2:x:193:100::/home/user2:/bin/bash
user3:x:194:100::/home/user2:/bin/bash

I know user2 and user3 have they password in /etc/shadow, but i think user1 is disabled, isn??t it?. But when i watch at /etc/shadow :

user1:$1$ggHyD5T$7RSEJYlrgBhfG25Y71bG1L0:12115:0:99999:7:::
user2:!!:12114:0:99999:7:::
user3:*:11988:0:99999:7:::

So, account for user1 and user3 are disabled or not? And finally, what??s the meaning of "!!" in the passwd field of /etc/shadow in user2?
How i can disable an account using /etc/shadow?

Best regards and Thxs in advance

Rod
"Try it, and if it doesn´t work...run!!"
U.SivaKumar_2
Honored Contributor

Re: meaning of the fields in /etc/shadow

Hi,

* or !! in the password field of /etc/shadow indicates that the account is disabled.

regards,

U.SivaKumar
Innovations are made when conventions are broken
Rod_13
Occasional Advisor

Re: meaning of the fields in /etc/shadow

Thanks,, is there any difference between !! and * ?
So, the /etc/shadow overrides anything in /etc/passwd?

Best Regards

Rod
"Try it, and if it doesn´t work...run!!"
U.SivaKumar_2
Honored Contributor
Solution

Re: meaning of the fields in /etc/shadow

Hi,

no difference , i have seen either of them just disables the account.

regards,

U.SivaKumar
Innovations are made when conventions are broken