Click to See Complete Forum and Search --> : Viewing /etc/passwd
mingshun
07-27-2002, 01:46 PM
Hi,
I'm currently administrating (newbie) one of the machines in my
school. I have created a dummy account for myself and have
looked into /etc/passwd for my own password. However,
whenever I use my password in /etc/passwd to login to my
dummy account, it failed because of wrong password.
Here's snippet of my /etc/passwd:
==
my /etc/passwd:dummy:x:111:111::/home/chroot:/usr/local/bin/jail
==
Question:
Should I type "111:111" or ":x:111:111:" or "x:111:111:" for my
dummy account password?
Thanks
fancypiper
07-27-2002, 02:00 PM
For default installations, the passwords aren't in plain text. I vaguely remember something about shadow passwords but my install was a few years ago.
When you created the account, did you set the password?
man passwd
info passwd
Example:[root@fancypiper root]# passwd fancy
Changing password for user fancy
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully
You might wish to bookmark Linux Newbie Administrator Guide (http://sunsite.dk/linux-newbie/)
mingshun
07-27-2002, 02:28 PM
Originally posted by fancypiper
For default installations, the passwords aren't in plain text. I vaguely remember something about shadow passwords but my install was a few years ago.
My sentiments exactly ...
What I see is NOT what I get :p
It is important for me to know the password of a new user
because I am supposed to mail to the new user to inform his/her
password.
When you created the account, did you set the password?
At first no. But after trying sometime to search for my password,
I gave up. :p In the end, being root, I set my password.
man passwd
info passwd
I did man -a passwd. In the FILES section, it tells me to look for
/etc/pam.d/passwd. But when I look at it, this is what I get:
==
#%PAM-1.0
auth required /lib/security/pam_stack.so service=system-auth
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth
===
I don't see the link in looking the password here. Those *.so are
unknown binaries to me. As for the other passwd manual page,
it tells me to look for /etc/passwd.
You might wish to bookmark Linux Newbie Administrator Guide (http://sunsite.dk/linux-newbie/)
Oh thanks thanks :D
fancypiper
07-27-2002, 02:41 PM
I think they might be modules loaded by pam, but I don't know. It's part of the security system of Linux and it works, so I haven't had to fix that (yet).
baldguy
07-27-2002, 08:14 PM
The /etc/passwd file doesn't include any passwords in it. The second item delimited by : (colons) is an x. Your encrypted and salted password hash is stored in (probably) /etc/shadow. You can't read the password for this. You have to create a password for each account yourself. They can use the password to log on and change it themselves to something else.
mingshun
07-28-2002, 02:09 AM
Originally posted by baldguy
The /etc/passwd file doesn't include any passwords in it. The second item delimited by : (colons) is an x. Your encrypted and salted password hash is stored in (probably) /etc/shadow. You can't read the password for this. You have to create a password for each account yourself. They can use the password to log on and change it themselves to something else.
Oh, no wonder.
By the way, I heard that there is an utility that can help us to create "human readable"(wouldn't include things like zero and "o" for ordinary together) random password. Do you know where can I get such a program?
Thanks