what is the difference between /etc/shadow and /etc/passwd [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-2
down vote

favorite












What is the major difference between /etc/shadow and /etc/passwd



In /etc/shadow we have the same data as in /etc/passwd.










share|improve this question















closed as off-topic by dr01, msp9011, Jeff Schaller, Thomas, jimmij Aug 7 at 19:41


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – dr01, msp9011, Thomas, jimmij
If this question can be reworded to fit the rules in the help center, please edit the question.












  • I can't comment but you can find informations there : askubuntu.com/questions/445361/…
    – Romain
    Aug 7 at 9:39










  • This question is predicated upon two false premises. First: We don't necessarily have /etc/shadow in the first place, although some of us might have an /etc/spwd.db. Second: They do not have the same data.
    – JdeBP
    Aug 7 at 13:37






  • 1




    There is no request for learning materials in this question, as three people have so far flagged it. That is an abuse of that closure reason.
    – JdeBP
    Aug 7 at 13:39














up vote
-2
down vote

favorite












What is the major difference between /etc/shadow and /etc/passwd



In /etc/shadow we have the same data as in /etc/passwd.










share|improve this question















closed as off-topic by dr01, msp9011, Jeff Schaller, Thomas, jimmij Aug 7 at 19:41


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – dr01, msp9011, Thomas, jimmij
If this question can be reworded to fit the rules in the help center, please edit the question.












  • I can't comment but you can find informations there : askubuntu.com/questions/445361/…
    – Romain
    Aug 7 at 9:39










  • This question is predicated upon two false premises. First: We don't necessarily have /etc/shadow in the first place, although some of us might have an /etc/spwd.db. Second: They do not have the same data.
    – JdeBP
    Aug 7 at 13:37






  • 1




    There is no request for learning materials in this question, as three people have so far flagged it. That is an abuse of that closure reason.
    – JdeBP
    Aug 7 at 13:39












up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











What is the major difference between /etc/shadow and /etc/passwd



In /etc/shadow we have the same data as in /etc/passwd.










share|improve this question















What is the major difference between /etc/shadow and /etc/passwd



In /etc/shadow we have the same data as in /etc/passwd.







passwd shadow






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 7 at 9:40









sai sasanka

54019




54019










asked Aug 7 at 9:32









Rahul Kamboj

1025




1025




closed as off-topic by dr01, msp9011, Jeff Schaller, Thomas, jimmij Aug 7 at 19:41


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – dr01, msp9011, Thomas, jimmij
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by dr01, msp9011, Jeff Schaller, Thomas, jimmij Aug 7 at 19:41


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – dr01, msp9011, Thomas, jimmij
If this question can be reworded to fit the rules in the help center, please edit the question.











  • I can't comment but you can find informations there : askubuntu.com/questions/445361/…
    – Romain
    Aug 7 at 9:39










  • This question is predicated upon two false premises. First: We don't necessarily have /etc/shadow in the first place, although some of us might have an /etc/spwd.db. Second: They do not have the same data.
    – JdeBP
    Aug 7 at 13:37






  • 1




    There is no request for learning materials in this question, as three people have so far flagged it. That is an abuse of that closure reason.
    – JdeBP
    Aug 7 at 13:39
















  • I can't comment but you can find informations there : askubuntu.com/questions/445361/…
    – Romain
    Aug 7 at 9:39










  • This question is predicated upon two false premises. First: We don't necessarily have /etc/shadow in the first place, although some of us might have an /etc/spwd.db. Second: They do not have the same data.
    – JdeBP
    Aug 7 at 13:37






  • 1




    There is no request for learning materials in this question, as three people have so far flagged it. That is an abuse of that closure reason.
    – JdeBP
    Aug 7 at 13:39















I can't comment but you can find informations there : askubuntu.com/questions/445361/…
– Romain
Aug 7 at 9:39




I can't comment but you can find informations there : askubuntu.com/questions/445361/…
– Romain
Aug 7 at 9:39












This question is predicated upon two false premises. First: We don't necessarily have /etc/shadow in the first place, although some of us might have an /etc/spwd.db. Second: They do not have the same data.
– JdeBP
Aug 7 at 13:37




This question is predicated upon two false premises. First: We don't necessarily have /etc/shadow in the first place, although some of us might have an /etc/spwd.db. Second: They do not have the same data.
– JdeBP
Aug 7 at 13:37




1




1




There is no request for learning materials in this question, as three people have so far flagged it. That is an abuse of that closure reason.
– JdeBP
Aug 7 at 13:39




There is no request for learning materials in this question, as three people have so far flagged it. That is an abuse of that closure reason.
– JdeBP
Aug 7 at 13:39










3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










Historically /etc/passwd had all of the user data, there was no shadow.
However it was discovered that a dictionary attack could be done on the file, to discover passwords (if they are in the dictionary).



Therefore it was decided to remove the passwords from /etc/passwd, the rest of the file remained, as it was used my many programs e.g. ls. The passwords were moved to /etc/shadow, and this file was made so that only root can read it.



/etc/passwd now has an x for the password field.
/etc/shadow only shares the first field (the key-field / the user name).
/etc/shadow has been expanded to contain other password management fields.






share|improve this answer





























    up vote
    1
    down vote













    The existence of the two files is a consequence of that /etc/passwd is a text file that can be read by other applications (as finger, ident or ls for example), so an attacker could gain access to the information of the file that included the hashed password.



    To increase security, the hashed password that used to be in the file was moved to other file called /etc/shadow that is accessible only by root






    share|improve this answer





























      up vote
      0
      down vote













      The major difference is that they contain different pieces of data.



      passwd contains the users' public information (UID, full name, home directory), while shadow contains the hashed password and the password expiry data. The reasons for the division are partly historical.



      See the man pages: passwd(1) and shadow(1)






      share|improve this answer



























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        1
        down vote



        accepted










        Historically /etc/passwd had all of the user data, there was no shadow.
        However it was discovered that a dictionary attack could be done on the file, to discover passwords (if they are in the dictionary).



        Therefore it was decided to remove the passwords from /etc/passwd, the rest of the file remained, as it was used my many programs e.g. ls. The passwords were moved to /etc/shadow, and this file was made so that only root can read it.



        /etc/passwd now has an x for the password field.
        /etc/shadow only shares the first field (the key-field / the user name).
        /etc/shadow has been expanded to contain other password management fields.






        share|improve this answer


























          up vote
          1
          down vote



          accepted










          Historically /etc/passwd had all of the user data, there was no shadow.
          However it was discovered that a dictionary attack could be done on the file, to discover passwords (if they are in the dictionary).



          Therefore it was decided to remove the passwords from /etc/passwd, the rest of the file remained, as it was used my many programs e.g. ls. The passwords were moved to /etc/shadow, and this file was made so that only root can read it.



          /etc/passwd now has an x for the password field.
          /etc/shadow only shares the first field (the key-field / the user name).
          /etc/shadow has been expanded to contain other password management fields.






          share|improve this answer
























            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            Historically /etc/passwd had all of the user data, there was no shadow.
            However it was discovered that a dictionary attack could be done on the file, to discover passwords (if they are in the dictionary).



            Therefore it was decided to remove the passwords from /etc/passwd, the rest of the file remained, as it was used my many programs e.g. ls. The passwords were moved to /etc/shadow, and this file was made so that only root can read it.



            /etc/passwd now has an x for the password field.
            /etc/shadow only shares the first field (the key-field / the user name).
            /etc/shadow has been expanded to contain other password management fields.






            share|improve this answer














            Historically /etc/passwd had all of the user data, there was no shadow.
            However it was discovered that a dictionary attack could be done on the file, to discover passwords (if they are in the dictionary).



            Therefore it was decided to remove the passwords from /etc/passwd, the rest of the file remained, as it was used my many programs e.g. ls. The passwords were moved to /etc/shadow, and this file was made so that only root can read it.



            /etc/passwd now has an x for the password field.
            /etc/shadow only shares the first field (the key-field / the user name).
            /etc/shadow has been expanded to contain other password management fields.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 7 at 9:47

























            answered Aug 7 at 9:41









            ctrl-alt-delor

            9,12931948




            9,12931948






















                up vote
                1
                down vote













                The existence of the two files is a consequence of that /etc/passwd is a text file that can be read by other applications (as finger, ident or ls for example), so an attacker could gain access to the information of the file that included the hashed password.



                To increase security, the hashed password that used to be in the file was moved to other file called /etc/shadow that is accessible only by root






                share|improve this answer


























                  up vote
                  1
                  down vote













                  The existence of the two files is a consequence of that /etc/passwd is a text file that can be read by other applications (as finger, ident or ls for example), so an attacker could gain access to the information of the file that included the hashed password.



                  To increase security, the hashed password that used to be in the file was moved to other file called /etc/shadow that is accessible only by root






                  share|improve this answer
























                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    The existence of the two files is a consequence of that /etc/passwd is a text file that can be read by other applications (as finger, ident or ls for example), so an attacker could gain access to the information of the file that included the hashed password.



                    To increase security, the hashed password that used to be in the file was moved to other file called /etc/shadow that is accessible only by root






                    share|improve this answer














                    The existence of the two files is a consequence of that /etc/passwd is a text file that can be read by other applications (as finger, ident or ls for example), so an attacker could gain access to the information of the file that included the hashed password.



                    To increase security, the hashed password that used to be in the file was moved to other file called /etc/shadow that is accessible only by root







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Aug 7 at 9:48

























                    answered Aug 7 at 9:43









                    jcbermu

                    3,254719




                    3,254719




















                        up vote
                        0
                        down vote













                        The major difference is that they contain different pieces of data.



                        passwd contains the users' public information (UID, full name, home directory), while shadow contains the hashed password and the password expiry data. The reasons for the division are partly historical.



                        See the man pages: passwd(1) and shadow(1)






                        share|improve this answer
























                          up vote
                          0
                          down vote













                          The major difference is that they contain different pieces of data.



                          passwd contains the users' public information (UID, full name, home directory), while shadow contains the hashed password and the password expiry data. The reasons for the division are partly historical.



                          See the man pages: passwd(1) and shadow(1)






                          share|improve this answer






















                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            The major difference is that they contain different pieces of data.



                            passwd contains the users' public information (UID, full name, home directory), while shadow contains the hashed password and the password expiry data. The reasons for the division are partly historical.



                            See the man pages: passwd(1) and shadow(1)






                            share|improve this answer












                            The major difference is that they contain different pieces of data.



                            passwd contains the users' public information (UID, full name, home directory), while shadow contains the hashed password and the password expiry data. The reasons for the division are partly historical.



                            See the man pages: passwd(1) and shadow(1)







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Aug 7 at 12:16









                            ilkkachu

                            50.9k678140




                            50.9k678140












                                Popular posts from this blog

                                How to check contact read email or not when send email to Individual?

                                Displaying single band from multi-band raster using QGIS

                                How many registers does an x86_64 CPU actually have?