Operating System - HP-UX
1830081 Members
2459 Online
109998 Solutions
New Discussion

/etc/groups & /etc/passwd is missing user information.

 
shyam prakash
New Member

/etc/groups & /etc/passwd is missing user information.

Hi,

I find this strange situation on one of the HPUX box.

there is a user 'prakashg' existing on this machine. But its user and groups are not visible in /etc/groups/ & /etc/passwd files.

But that user can enter the machine using his password.

also he can execute commands as a normal user (not super user).

when i give id prakashg below are the entries i can see....

id prakashg
uid=11512(prakashg) gid=36(cer) groups=605(cvsusers1)

i tried to delete the user in command promt...but it did not delete with the below output.

userdel prakashg
Login 'prakashg' does not exist

Strange is...this system doesn not have a groups as it specifies above for the user.

Even SAM doesnt display the user and its groups.

I tried to manually recreate the user by making an entry into the passwd and groups file in /etc/ then tried to delete using the userdel command. the new entries were deleted, but the old user again reappeared.

Can you help here?

Regards,
Shyam

11 REPLIES 11
Suraj K Sankari
Honored Contributor

Re: /etc/groups & /etc/passwd is missing user information.

Hi shyam,

Really its a strange problem, you can do one thing create the same user by SAM and change the passwd, check with id command is it same what you are mentioned there ? then try to login with old passwd see what is happening, if you are not able to login with old passwd then delete the user through SAM.

I donâ t know it will work or not just try

Suraj
Kenan Erdey
Honored Contributor

Re: /etc/groups & /etc/passwd is missing user information.

Hi,

check the user with logins command.
Computers have lots of memory but no imagination
SKR_1
Trusted Contributor

Re: /etc/groups & /etc/passwd is missing user information.

What exactly you have done......i think you tried to delete the user first.but you have not selected right options with userdel command.

give the output of below

grep username /etc/passwd
id username
more /etc/group

You can delete the user with

userdel -r username

Thanks

SKR

shyam prakash
New Member

Re: /etc/groups & /etc/passwd is missing user information.

Here is what i did before manually recreating the entries into the /etc/passwd and /etc/groups files.

as you said... i tried to
1) grep prakashg /etc/passwd (none found)
2) more /etc/groups (no groups as by name in the id command was found).
3) create the same user with SAM. (user already exists it said).

In all the above cases it failed, reasons as in paranthesis above.

id prakashg
gave me the details as below....
uid=11512(prakashg) gid=36(cer) groups=605(cvsusers1)

the groups cer and cvsusers1 does not exists in the system.

after all this i went on to recreate them all and then delete them. but i did not succeed in recreating the groups. wonder where they came from.

shyam prakash
New Member

Re: /etc/groups & /etc/passwd is missing user information.

The logins command works for cer group and not for cvsusers1

logins command output for prakashg(user) is as below...

logins -l prakashg
prakashg 150 users 20 ,,,


logins for cer group is quite large, since there are many user associated with that group. not the same case for cvsusers1

Dennis Handly
Acclaimed Contributor

Re: /etc/groups & /etc/passwd is missing user information.

Do you have NIS? If so, what does "ypcat passwd | grep prakashg" show?
Kenan Erdey
Honored Contributor

Re: /etc/groups & /etc/passwd is missing user information.

you may be working on NIS. check if it's set in /etc/rc.config.d/namesrvs. If you want to delete the user please follow the link:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1224883
Computers have lots of memory but no imagination
Suraj K Sankari
Honored Contributor

Re: /etc/groups & /etc/passwd is missing user information.

Hi,
Yes, It seems that you have a NIS server there. Please check this that NIS is existing or not on your Setup.

Once you logged there pls run pwd to see where is the home directory of the user and also check the bdf command.

Pls check /etc/auto.master, and other file s inside the /etc start with auto*.

Check /etc/nsswitch.conf and /etc/nsswitch.nis file

Suraj
shyam prakash
New Member

Re: /etc/groups & /etc/passwd is missing user information.

Output of ypcat passwd | grep prakashg is as below...

prakashg:QOIh.0L/GEMGs:11512:36:Ashok Prakash#11111111#,Bangalore,N/A,prakashg,:/h/prakashg:/bin/csh


there is specific home directory created for this user and its been hardly used.

the home directory points to / location.

first few lines of the file /etc/rc.config.d/namesvrs looks as below...


NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
NIS_CLIENT=1
NISPLUS_SERVER=0
NISPLUS_CLIENT=0

I feel there is no NIS master and slave associated to here. Correct me if i am wrong.
Bill Hassell
Honored Contributor

Re: /etc/groups & /etc/passwd is missing user information.

> Output of ypcat passwd | grep prakashg is as below...
> prakashg:QOIh.0L/GEMGs:11512:36:Ashok Prakash#11111111#,Bangalore,N/A,prakashg,:/h/prakashg:/bin/csh

This confirms that your system is setup as an NIS client. NIS is a service that provides another password and group file that is not on your computer. Normally, when NIS is setup, most all users are documented on the NIS master.

> NIS_CLIENT=1
> I feel there is no NIS master and slave associated to here. Correct me if i am wrong.

Indeed you are setup to be a client and it is working correctly.


Bill Hassell, sysadmin
prasadb
Super Advisor

Re: /etc/groups & /etc/passwd is missing user information.

shyam prakash,

you have not assigned the points to any these Gurus who have given their precious time to resolve your problem.

assign them proper points..