Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I created a test user simply with the "adduser" command and he is the only user on the machine except root obvioulsy but now I am trying to delete his account and it tells me that he is logged in so I can't delete him. I assumed my question was very basic so I did a Google search on how to log out a curently logged in user with out rebooting the box.
I found a page that referenced the "skill" command which I assumed was sig kill and I tried the following suggestions but it does not work. What am I doing wrong or is the problem the Linux box for some strange reason?
[root@lt2fs0 home]# who
root pts/0 Aug 29 08:13 (10.1.1.204)
emery pts/1 Aug 28 15:07
[root@lt2fs0 home]# ps -u emery | grep bash$
ERROR: User name does not exist.
********* simple selection ********* ********* selection by list *********
-A all processes -C by command name
-N negate selection -G by real group ID (supports names)
-a all w/ tty except session leaders -U by real user ID (supports names)
-d all except session leaders -g by session OR by effective group name
-e all processes -p by process ID
T all processes on this terminal -s processes in the sessions given
a all w/ tty, including other users -t by tty
g OBSOLETE -- DO NOT USE -u by effective user ID (supports names)
r only running processes U processes for specified users
x processes w/o controlling ttys t by tty
*********** output format ********** *********** long options ***********
-o,o user-defined -f full --Group --User --pid --cols --ppid
-j,j job control s signal --group --user --sid --rows --info
-O,O preloaded -o v virtual memory --cumulative --format --deselect
-l,l long u user-oriented --sort --tty --forest --version
-F extra full X registers --heading --no-heading --context
********* misc options *********
-V,V show version L list format codes f ASCII art forest
-m,m,-L,-T,H threads S children in sum -y change -l format
-M,Z security data c true command name -c scheduling class
-w,w wide output n numeric WCHAN,UID -H process hierarchy
It sounds as - for some reason - the file /var/run/utmp has been not properly updated and all the applications that require a check for logged users are tricked (the who and users commands take info from this file). However it looks like the user emery has been deleted and pts/1 unallocated, since the ps command does not find them! You can easily verify these issues.
Furthermore, you can try the command last to see if emery is really still logged in, since in this case the file containing info is /var/log/wtmp. For example
[root@linux ~]# last
colucix pts/5 :0.0 Wed Aug 29 15:43 - 15:50 (00:06)
colucix pts/7 :0.0 Wed Aug 29 12:26 still logged in
Here, the first row tells about a closed session, the second one tells about a still open session. Also, the check suggested by pwc101 is worth a try.