Reading etc/passwd file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Reading etc/passwd file
# 1  
Old 12-19-2013
Reading etc/passwd file

I am new to UNIX and I am trying to read an etc/passwd file. I have 2 questions.

1) Looking at several of the User IDs, there are appears to be alphanumeric characters under the password column, for Root and Oracle. Does this mean that the password is not encrypted?

2) Should I be concerned that the "nobody" ID has a UID of -2? Also, should I have concerns that several User IDs have UID's set to 0 along with root.

3) Also, is there any risk associated with these settings?

Last edited by McMeatface; 12-19-2013 at 01:03 AM..
# 2  
Old 12-19-2013
Maybe giving us your OS and version can help us see more clear or not give you erroneous replies...
1) OK, and the others? what do they have?
2) nobody... will depend of OS... Several named admins can be a concern and sure is could leed to security issues if not understood and mastered..
There is one way to reduce risk: allow root login only from the console ( you are talking of a server, you do have a console yes?), all users must then use su to these superuser accounts...
But to say more we nned to know also more about your system...
# 3  
Old 12-19-2013
Thank you for your follow-up.

From my understanding, it is a HP-UX v11, both for the application and database servers.

It appears on the etc/passwd as follows:

root:WQ1mYBE39ot
oracle:5m473MOqY3n2

but then other IDs like adm have the "*" listed in the password field.
# 4  
Old 12-19-2013
adm is not a user as you and me and * means you cannot use the account like that
type: e.g.
Code:
ant:/var/adm/syslog $ uname -r
B.11.11

Because I dont kmow for 11.00 but 11.11 you can find a package to have the passwds in a shadow file ( the case of the box you see above... )
Otherwise it means that the passwd are what you see and as /etc/passwd is readable for all someone can copy it and has the hash..., the heavier alternative would be to turn on the trusted mode, but I dont advise that for people not having much knowlege about the plaform because you can quickly get into trouble like root account disabled etc... you need to know how the trusted mode works, where are the trusted DB and format and how to configure suitably the defaults... /etc/shadow is far easier though not as good...
this is how your /etc/passwd would look like after using the shadow module:
Code:
root:x:0:3::/:/sbin/sh
daemon:x:1:5::/:/sbin/sh
bin:x:2:2::/usr/bin:/sbin/sh
sys:x:3:3::/:
adm:x:4:4::/var/adm:/sbin/sh
uucp:x:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:x:9:7::/var/spool/lp:/sbin/sh
nuucp:x:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico
hpdb:x:27:1:ALLBASE:/:/sbin/sh
nobody:x:-2:-2::/:
www:x:30:1::/:
webadmin:x:40:1::/usr/obam/server/nologindir:/usr/bin/false
sshd:x:102:103:sshd privsep:/var/empty:/usr/bin/false
iwww:x:103:1::/home/iwww:/sbin/sh
owww:x:104:1::/home/owww:/sbin/sh
collma:x:108:526:,,,:/home/collma:/usr/bin/ksh
opc_op:x:777:77:OpC default operator:/home/opc_op:/usr/bin/ksh
vbe:x:200:2::/home/vbe:/usr/bin/ksh
gca:x:201:2::/home/gca:/usr/bin/ksh
.
.

# 5  
Old 12-19-2013
I think it is v20 or above, but the information you have provided is very good. Thank you for that and I will definitely make a note of it.

Also, is having a negative UID okay or should that be changed to a high positive integer for the nobody ID?
# 6  
Old 12-19-2013
as you can see I have nobody -2 also...
# 7  
Old 12-19-2013
version: uname -r
11.23 is v2...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Lost /etc/passwd file

Hello, I'm trying to recover my /etc/passwd file, but I can't make it work. Im doing the following: 1. Booting from cd-rom: 2. Mounting hard disk drive 3. Copying my passwd and shadow files to /a/etc/ 4. Unmounting Hard disk: 5. Rebooting 6. Stopping my OS from booting ( by pressing... (11 Replies)
Discussion started by: alvaradogunner
11 Replies

2. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

3. UNIX for Dummies Questions & Answers

help with passwd file

Not an unix expert, I read a few pages on the web about passwd files, but I didn't find the answers I need about the last 8 lines of the passwd file I'm taking a look at. I'm assuming their shortcuts to another file that may have the actual usernames of users on the system. Please, any help... (1 Reply)
Discussion started by: fusion31
1 Replies

4. AIX

Default /etc/passwd file

Hello All, Can anyone post the default /etc/passwd file for AIX? I would like to compare with an existing machine of mine and want to identify what are the default users that are created when the O/S is installed. In other words I would like to see the system users in AIX. Not the ones created... (1 Reply)
Discussion started by: lovesaikrishna
1 Replies

5. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

6. Shell Programming and Scripting

Reading passwd and need to use it multple times when script asks

Hi Gurus, I have one requirment.. I have written a script and it asks a registry passwd while performing some clearcase command. Now we are giving it manually. It's for one time run. We want to perform this for multiple times on multiple files throguh for loop.. means we need to pass the same... (3 Replies)
Discussion started by: raghu.iv85
3 Replies

7. Solaris

Reg. /etc/passwd file

Hi friends, i need a favour from u all i made a small change in home pc it is INTEL i had change /etc/passwd i just change the shell for the root instead of sh i kept bash and i had taken back up of the file /etc/passwd. now the problem is i am not able to log in as a root i got a error NO Shell... (10 Replies)
Discussion started by: kurva
10 Replies

8. UNIX for Dummies Questions & Answers

apache passwd file

i am using apache2.0, and i used this command to create username/passwd: ./htpasswd -b passwd.file username password is it away to translate password back to plaintext ? for example, passwd.file contains: username:HnennjvqsGaQs i want to translate back to: username:password (1 Reply)
Discussion started by: tjmannonline
1 Replies

9. Shell Programming and Scripting

help in /etc/passwd file

Hi all, As all of us know that in /etc/passwd file the first field correspond to username could any one tell me what is bin , damoen etc in the first field, and r they in user field , what is nologin in the last column ? root:x:0:0:root:/root:/bin/bash ... (4 Replies)
Discussion started by: useless79
4 Replies

10. Cybersecurity

/etc/passwd file

hi Does anyone anyone know what the last line of a unix user passwd file signifes? Mine shows "+:::::" best (4 Replies)
Discussion started by: s_mad010
4 Replies
Login or Register to Ask a Question