generate list of shell users via ssh

jdfcomputers

Member
Apr 12, 2004
22
0
151
Is there a method where one can generate a list of cpanel users that have shell access via SSH or possibly make a cron job that emails the list of user with SSH access daily.

Any help would be greatly appreicated, we have several servers and instead of logging into each WHM, an automated script would save us a lot of time.

JDF
 

maximus_marcus

Well-Known Member
Mar 9, 2006
58
0
156
JDF,

You can use the following command to know the users with the bash shell and then you can go aheah and add this to a file and set it up in the cron to check periodically .

###############################

grep bash /etc/passwd |cut -d : -f1
################################

JailShell
========

#####################

grep jail /etc/passwd |cut -d : -f1

#####################


Let me know if you need any assistance with this .