1832658 Members
3241 Online
110043 Solutions
New Discussion

how to find the user

 
Ramana.Sv
Frequent Advisor

how to find the user

how to find the user in hp-ux,
i want remove all the users in that....
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: how to find the user

I'm not sure what you're asking.

Find what user??? Remove which users???

Could you please explain a little further?


Pete

Pete
Ramana.Sv
Frequent Advisor

Re: how to find the user

i want list out all user in my hp-ux system and want remove unnecessary user in that how to do???
Oviwan
Honored Contributor

Re: how to find the user

you can user sam or

$cat /etc/passwd | awk -F: '{print $1}'
Pete Randall
Outstanding Contributor

Re: how to find the user

Write a little script like this:

$ cat finger_user

for USER in `cat /etc/passwd | awk -F: '{print $1}'`
do
finger $USER
done

Then run that script and analyze the output:

$ finger_user > finger.out

You will see, for each user, information like this:

$ finger rochelle
Login name: rochelle In real life: Rochelle E. Franklin
Bldg: registry2
Directory: /home/rochelle Shell: /usr/bin/sh
Never logged in.
No unread mail
No Plan.

The key here is the "Never logged in" line. If this says "never" or the last login was a long time ago, you might want to consider removing the user.


Pete

Pete
Yogeeraj_1
Honored Contributor

Re: how to find the user

hi,

Be cautious. Do not remove any system accounts that may cause your system to become unstable.

Also, I would recommend using SAM for removal of user accounts.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)