LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-05-2013, 02:33 PM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
How to tell if account is used anymore for anything


First, let me apologize, as I know this is a vague question.
Looking in /etc/passwd on a vsftp server, I noticed an account toward the top of that file that doesn't have a shell listed and the home folder for it is no longer valid. I did a su to that account and there's no crontab and if i hit up/down i dont get any recent commands.
What else would you suggest I check before I can feel fairly confident this account is no longer used for anything and can be deleted?
 
Old 09-05-2013, 03:06 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Change the password, sure, but delete? not so much.
Or give the user a false or nologin shell?

Just my advice,
 
Old 09-05-2013, 04:13 PM   #3
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
probably solid advice as a first step :-)

but if the account is somehow used for some process local to the server, would doing that give me a hint in either direction?
 
Old 09-05-2013, 06:03 PM   #4
hybby
LQ Newbie
 
Registered: Jun 2013
Location: scotland
Distribution: centos
Posts: 2

Rep: Reputation: 0
you could always check "last" to see if the user has logged in any time recently...
 
Old 09-06-2013, 01:24 AM   #5
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
Code:
last username
 
Old 09-06-2013, 01:50 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
or grep the auth.log under /var/log
 
Old 09-06-2013, 08:25 AM   #7
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
a last username just returns the following, so i'm guessing that means it had to have been before that timestamp.

wtmp begins Mon May 13 13:57:46 2013

I don't see an auth.log in /var/log either.
 
Old 09-06-2013, 08:33 AM   #8
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Rep: Reputation: 18
Please check whether any process is owned by that user by 'ps aux | grep username'
 
Old 09-06-2013, 09:32 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
last <user> -f /var/log/btmp
for historical records, if btmp exists.
 
Old 09-06-2013, 12:10 PM   #10
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
nothing from the ps aux

that last command returns this

btmp begins Fri Aug 16 06:37:30 2013
 
Old 09-06-2013, 01:07 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Same reasoning applies, change password, wait, oh say [69]0 days, delete account...
 
Old 09-06-2013, 01:14 PM   #12
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Yeah, I think that's about the only option right now. Thanks for the help.
 
Old 09-06-2013, 02:26 PM   #13
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
no worries.
Glad to be of help.
 
Old 09-06-2013, 02:59 PM   #14
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 211

Rep: Reputation: 67
Would writing a shell that logs the event someplace handy and then exec's the real login shell work for you?
 
Old 09-09-2013, 01:59 PM   #15
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
I don't understand what that would do in this case, can you explain?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIC not installed anymore, KDE not installed anymore, LILO duplicate Volume ID error scottad Slackware 2 03-31-2012 12:13 AM
Cant login to yahoo email account anymore? M$ISBS General 2 11-11-2006 08:37 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
User account goes totally bonk, no applications can run anymore. Baldorg Linux - General 5 07-28-2005 11:51 AM
cannot logt in anymore with my user account Adaptive Linux - General 3 11-06-2003 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration