Find the answer to your Linux question:
Results 1 to 3 of 3
Im using an older version of Fedora (4) and I was wondering why permission was denied for the /etc/passwd command with the root account. I just created a new user, ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Location
    Raleigh
    Posts
    1

    user accounts

    Im using an older version of Fedora (4) and I was wondering why permission was denied for the /etc/passwd command with the root account. I just created a new user, set the password and was wondering why I couldn't look at that file.

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    Don't run /etc/passwd as a command, it is a file. Any file without execute permissions, in this case a text file, will return a "permission denied" error if you try to execute it. Try to use the cat or less command to see what's inside it.
    Code:
    cat /etc/passwd
    less /etc/passwd
    You can hit the 'q' key to exit from less.

    Your password won't be held in /etc/passwd, only your user info. Your password is hashed in /etc/shadow which is a file that can only be accessed by root.

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    There is no /etc/passwd command, /etc/passwd is a file.
    http://en.wikipedia.org/wiki/Passwd_(file)

    If you want to look at it, do
    Code:
    cat /etc/passwd
    EDIT: Beat to the punch.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...