adspace


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

Answer Posted / Suhail Abbas

To find out details of a specific user in Linux, you can use the following commands:
1. User Information: `id <username>`
2. Home Directory: `echo $HOME` or `ls -ld /home/<username>`
3. Login Shell: `grep '<username>' /etc/passwd`
4. Account Creation Date & Last Login Time: `last <username>`

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.

2325