I'm trying to write a script to create a file with a list of all users, their gid, gecos field and their last login time
e.g.
Quote:
user1 22 Fred Bloggs Sep 20
fairly new to scripting, this is what I've got so far
The output of the first part is fine but I can't get the loop and last command working, and need to append the output of 'last -1' for each user to the end of their 'line'
Any help would be greatly appreciated!
Last edited by Yogesh Sawant; 02-10-2011 at 05:52 AM..
Reason: added code tags
Hello everyone
I need to send to a file the last command from all users who log in and log out by week or month.
My questions are
I can do it with the command or I need to do a script ?
If the answer is I need to do a script, someone can help me because Im complete new to make a... (3 Replies)
i'm sorry if yesterday i posted this thread in unix for dummies forums, :D
i am a newbie in C programming
i want to get active users list and their login time...
i have search and learn about passwd and utmp, but i only can get user list without their login time...
do you have an idea... (2 Replies)
Hello,
I'm trying to do a list of user that never connected to a couple of servers. I want to do a diff between the servers lists, and print out only the users that never has logged on each server. Here my first step :
SERVER01:
# finger `egrep -v -e "^\s*#" /etc/passwd | awk '{ print $1 }' |... (4 Replies)
Dear Forum,
I had this case before, all of sudden all users including root can't login. What done is by connecting to console port and resetting root password, "pwunconv" command, reboot server.
My question is, how this can happen???
thanks
:confused: (3 Replies)
Hi Guys
I did a forum search for "ftp scripts" Looked at 8 pages and didnt see anything that would help. Most seem to be logging into a ftp server and transfering files.
What I need to do is login to a FTP server. Goto a folder and list it so it showes newest files first. It would be nice to... (4 Replies)
Dear All
I am facing a problem with my script.
I have to found the primary group of users .
So first I selected all the groups and users register from a specific user : ONE
Then I am making a file with all groups attached to the user : ONE
Then I am making a file with all... (8 Replies)
I need to list all the failed log in users as part of audit report. How can I do so in Linux to find all the audit log records and then upload to a table for future reference. I am using oracle 10g on Linux. Hope I will get a quick response from the experts.
Thanks in advance for the tips. (3 Replies)
Hi,
I have a situation where I want to ignore few users from list of users and print rest of user in log file.
say, I want to ignore aaa, bbb, ccc, ddd .. ppp from list of 20 user (do not want to include)
What is the good command or any script?
Thanks in advance. (1 Reply)
hi my friends
im asking for the possibility to creat a script in ubuntu for added date to list users for doing this :
- search in debug connected user of all connected users
- if a new user is connect for the first time to my server
the script record the date of the connection and added it... (1 Reply)
I'm writing a script to use as a LoginHook for my Mac users. As part of this script, I need to write to a location in their home directory, but I can't seem to access the path - at this point in the login process, $HOME is empty and ~ gives the path to root's home. Unfortunately, I can't just do... (1 Reply)
Discussion started by: blondepianist
1 Replies
LEARN ABOUT DEBIAN
login.access
LOGIN.ACCESS(5) BSD File Formats Manual LOGIN.ACCESS(5)NAME
login.access -- login access control table
DESCRIPTION
The login.access file specifies on which ttys or from which hosts certain users are allowed to login.
At login, the /etc/login.access file is checked for the first entry that matches a specific user/host or user/tty combination. That entry can
either allow or deny login access to that user.
Each entry have three fields separated by colon:
o The first field indicates the permission given if the entry matches. It can be either ``+'' (allow access) or ``-'' (deny access) .
o The second field is a comma separated list of users or groups for which the current entry applies. NIS netgroups can used (if configured)
if preceeded by @. The magic string ALL matches all users. A group will match if the user is a member of that group, or it is the user's
primary group.
o The third field is a list of ttys, or network names. A network name can be either a hostname, a domain (indicated by a starting period),
or a netgroup. As with the user list, ALL matches anything. LOCAL matches a string not containing a period.
If the string EXCEPT is found in either the user or from list, the rest of the list are exceptions to the list before EXCEPT.
BUGS
If there's a user and a group with the same name, there is no way to make the group match if the user also matches.
SEE ALSO login(1)AUTHORS
The login_access() function was written by Wietse Venema. This manual page was written for Heimdal.
HEIMDAL March 21, 2003 HEIMDAL