Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
List the last 3 times you logged into the hottub and the command(s) you used to obtain this information
2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all code and scripts):
1) last agreen1 |head -n 3
2) tail -n 100 messages|grep agreen1
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Illinois, O'Reilly School of Technology, Kelly Hoover, Linux/Unix 1: The Unix file system
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
So basically I telnet into a server called cold1 then ssh into a server called hottub, and then into one called bubble. I have root privilege in my bubble.
When i use the "last" command I was told that it only shows me where I have come from not where I am. If Im logged into the bubble it will show me my hottub logins. If Im on huttub it will show me my cold1 logins. So thats not the way.
So I logged into the hottub server and used cd /var/log to get to the log diectory. Then used the above command: tail -n 100 messages|grep agreen1.
This what my instructor said about my failed attempt: "You have the idea however we have a simpler command with a simpler output, that just shows logins and can specify only the last 3 logins.
See the man page for last. The last command tells you about logins on the current host; look for options to limit the output both by number of lines and by user. Look at the man page for hostname as that will help you determine where you are.
Last does include information about where you logged in from, but I think that's not important for your assignment. Yes, you are on the right track I think.
Thank you for your help. Im not seeing anything in the last man page. I also was just looking at the tail man page. If I tail the file messages and pipe it through a search of my user name I get the info I need (at least it seems that way) but apparently there is an easier way or simpler command. I have reviewed my lesson several times and Im not seeing it. Ill messages her tomorrow if need be. I was trying for some help here because sometimes it starts a discussion and you can learn more from a group of people.
Seems to me the -n option to last would be helpful as well as the ability to sepecify the user name on the command line to limit what last presents. It is quite possible that in your environment the last command is different. What environment are you running (shell and o/s)?
Two hints: Suppose you go to the car shop to buy some replacement part. If the dealer asks you which car it is you don't answer "a red one" or "a Ford". You tell him the exact model and the year it was built.
If you are asked about the OS you don't answer "Linux", but ideally the output of uname -a, eventually followed by the distribution and version. For instance:
This tells the kernel version (2.6.35-22), that it is a 64-bit system (x86_64) and the distribution (Ubuntu), from the kernel version one can deduce that it is Ubuntu 10.04.
The second hint: are you sure you read the right man page? Maybe man pages are not installed (install them) or are not installed properly? Are they indexed correctly? (I am not sure if this is necessary in Linux - in AIX after installing man pages root is supposed to issue catman -w.)
Just to make sure we talk about the same: this is the page you should see:
Hi folks,
I am fairly a beginner when it comes to Solaris OS administration, but part of my job somehow has scope to provide L1-level of OS administration over a few solaris servers.
Now, we have a requirement to limit the number of simultaneous ssh logins/sessions to the server, sort of... (0 Replies)
Ok got a strange one here. None of my user accounts are able to login into the system. When trying to ssh to the server i get the following.
Could not chdir to home directory /home/<homedir>: Permission denied
/bin/sh: Permission denied
I checked the permissions on the home directory and even... (7 Replies)
Hi team,
I tried to modify the /etc/security/limits.conf file to limit the root user for more one login. I added the line in limits.conf file like:
@root hard maxlogins 1
I also tried to modify /etc/ssh/sshd_config to limit the root userlogin by adding this:
... (10 Replies)
Is it possible to configure a Solaris server to authenticate users against an Active Directory server when logging in via ssh?
I've seen some docs out there, I've followed their instructions, but it does not work. And I'm beginning to wonder if it is possible or even supported by Oracle. The... (2 Replies)
Hello, I want to write a script that takes a username as input and outputs the user's logins sorted by duration. Also I want to exclude the "still logged in" entries.
I use the "last" command but Im having problems sorting the entries based on the duration.
Can you help me?
Thanks a lot =) (4 Replies)
Is the below logins are needed in the machine.....
nuucp , uucp ,smmsp , svctag , listen , webservd , ip ( We are not using printers),
Can you help in these?
Regards,
kumar (3 Replies)
I want to know how I can turn off and turn on login logging. We have a server that appears to have stopped logging user logins. Running the who command shows nothing and the last command shows no logins for a month. The var/adm/wtmp file isn't full and there is plenty of space in the var file... (2 Replies)
I want to apply patches in multiuser mode but stop logins of other users while I do it?
What is the best way to do this?
I will be connected to the system via a putty session over a serial cable from another system (console is messed up)...
Should I put in a dummy passwd and shadow file... (7 Replies)
Hello everyone, traditionally a user can log in on more than one machine as much as they want. In AIX 4.3, Is there a way to make it so that if the user is already logged on, the system will not let them log on, therefor not run their logon profile script again? (limit the user to one machine at a... (1 Reply)
I am writting a daemon in python which should start at system start up with all inet.d services
on an NIS server. Then it should listen to any user login and then start a new process for that user on his login which will continue throughout his entire session.
Can anyone give any help or any... (1 Reply)