Find the answer to your Linux question:
Results 1 to 5 of 5
Distribution: Red Hat Linux 9 I was reading something on Unix-flavors security yesterday... it talked about editing /etc/passwd... and my first thought was, "come on, it can't be THAT easy." ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Location
    /home/glider
    Posts
    3

    /etc/passwd permissions problems


    Distribution: Red Hat Linux 9

    I was reading something on Unix-flavors security yesterday... it talked about editing /etc/passwd... and my first thought was, "come on, it can't be THAT easy." So... I booted up my system and logged in as a normal user, and went to look at /etc/passwd. I noticed something very, very odd about its permissions settings in the properties window. The text and numbers didn't match. It looked like this:

    -rwxr--r--
    755

    Now, I may not be an authority on chmod, but I KNOW those don't match. According to one, I only had read access, and to the other, execute and read. And it turned out that NEITHER were right, because I was able to load it into gedit and add a happy new root account with no password. (Sheesh, it took maybe fifteen seconds to figure out how to format it...)

    Okay, that worked great, (I'm curious of the mechanics of it, as it happens... when you su into an account, whom do you get logged as? And what if it says Bash-2.05b# or something like that?) and today I went back to try it again, trying to append a string from the command line instead... and it didn't work. Huh?

    Checked the permissions... they still don't match, but now it says 644. When did this happen? How? Why? And what's the deal with the two permissions not matching?...

    Thanks in advance for any enlightenment you have to offer

  2. #2
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Geez, GliderGirl, you need to tighten security over there!
    Mine:
    Code:
    $ ls -l /etc/passwd
    -rw-r--r--    1 root     root         1472 Nov 14 23:40 /etc/passwd
    Tried editing with both gedit and with vi as normal user and both warned that it was a RO file and I was unable to change anything. In the Gnome File Manager, permissions are -rw-r--r-- and 644, with owner and group as "root". You don't have a Microsoft version of Linux, do you???
    /IMHO
    //got nothin'
    ///this use to look better

  3. #3
    Just Joined!
    Join Date
    Dec 2004
    Location
    /home/glider
    Posts
    3
    no, it's not Windows, it's a normal Red Hat installation.

    I'm not too worried about security, this thing doesn't even have an internet connection

    oh well. maybe i'm just stupid and missing something

    thanks for the reply

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    Quote Originally Posted by drakebasher
    You don't have a Microsoft version of Linux, do you???
    HAHAHAHAAAA good stuff drake
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  6. #5
    Linux Engineer
    Join Date
    May 2003
    Location
    Greece / Athens
    Posts
    1,169
    drakebasher that was really cool!
    Linux For Ever!

Posting Permissions

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