add function for finding local logins
This commit is contained in:
parent
849f4cf4e4
commit
c09fecdb89
1 changed files with 4 additions and 1 deletions
|
@ -1154,7 +1154,7 @@ function getdbcreds_cnf () {
|
|||
DB_PORT="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\2@')"
|
||||
DB_NAME="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\3@')"
|
||||
|
||||
cd -
|
||||
#cd -
|
||||
return 0
|
||||
}
|
||||
function connectdb () {
|
||||
|
@ -1203,4 +1203,7 @@ urldecode() {
|
|||
printf '%b' "${url_encoded//%/\\x}"
|
||||
}
|
||||
|
||||
findlocallogins() {
|
||||
last -F -a $(for i in $(find /var/log -maxdepth 1 -name "wtmp*"|sort -h);do echo -n "-f $i ";done)|grep -v "pts/\|reboot\|wtmp"|awk '{print $4,$5,$7}'|uniq
|
||||
}
|
||||
#EOF
|
||||
|
|
Loading…
Reference in a new issue