Sponsored Content
Top Forums Shell Programming and Scripting help to create script for added date to list users Post 302522061 by amzioujda on Friday 13th of May 2011 08:01:07 AM
Old 05-13-2011
help to create script for added date to list users

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 to my list user
where i have an other script to delet expired users

- like this :
user : test2 is in my user.cfg in this form =
.....
user:test1 passeword:test1
user:test2 passeword:test2
user:test3 passeword:test3
.......

when this user is connect in the first time in this date = 12-05-2011

the script record this date and added it to the line user of the user test & become like this
.....
user:test1 passeword:test1 #11-04-2011
user:test2 passeword:test2 #12-05-2011
user:test3 passeword:test3
......

Last edited by amzioujda; 05-13-2011 at 09:06 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to create users on many servers

Hi all, working on script to create a user acct on all our servers. for i in `cat $host_file`; do ssh $i /usr/bin/sudo /usr/bin/mkuser id='bpadm' gecos='NetBackup Admin' 2>&1 >> $log done error i get is: 3004-692 Error changing "id" to "bpadm" : Value is invalid. I have tried this in... (1 Reply)
Discussion started by: dnidiffer
1 Replies

2. UNIX for Dummies Questions & Answers

Create a list of files that were modified after a given date.

Hello Mates! I'm kinda new to unix and need to a solve a problem. Input: date Situation: With the given date I need to find a list of all such files starting from a given path that were modified after the given date. I experimented with the "find" with "-newer" but did not quite get it... (4 Replies)
Discussion started by: rkka
4 Replies

3. OS X (Apple)

interactive shell script to create users 10.4

Hello everyone, Not sure if this is the right place, but OS X isn't your standard Unix, so I figured here would be best. I am looking at creating a script that will be interactive that admins can run to create users. Now, 10.4 uses netinfo database and netinfo manager to handle it's users. ... (3 Replies)
Discussion started by: tlarkin
3 Replies

4. UNIX for Dummies Questions & Answers

How to do a login time and date list of users never logged on?

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)
Discussion started by: gogol_bordello
4 Replies

5. Solaris

su: No shell/No directory! if sys is added to a users secondary group

Hi, When I include a user to the secondary group "sys" GID=3 in Solaris 9 OS I'm not able to login. I get these error. The user home directory and the shell exists. Is this because of any security hardening. # su - agent No directory! # su agent su: No shell # grep taddm /etc/passwd... (14 Replies)
Discussion started by: agent001
14 Replies

6. Shell Programming and Scripting

Create new users in DMZ box using script

I remote to many DMZ boxes every day to run batch file that allows me to create users. I create users in 17 DMZ boxes every day which takes a lot of my time. Is there any script that would do this job from my local computer? Thank you for your help! (3 Replies)
Discussion started by: idiazza
3 Replies

7. Shell Programming and Scripting

Help with script to create users from database query

#!/bin/bash user=`mysql userList -uuserlist -puserlistpassword -s -N -e "SELECT userName FROM users WHERE activated='n'"` for i in $user; do useradd "$i" -m doneThis is what I have done so far. But obviously it still does not work. I'm trying to create users based on information stored in a... (5 Replies)
Discussion started by: bucketuk
5 Replies

8. Shell Programming and Scripting

Create users from a text file by script

Hi All, I am new to scripting, i want to create one script in which i can add users from a text file, assign them a default password like 123456. It should be like: Username= $i (it should take users from text file one by one) Password : 123456(default for every user) (1 Reply)
Discussion started by: prad_rocxx
1 Replies

9. Shell Programming and Scripting

Shell Script to filter users and create them again from a back-up server

This is a script to filter the users out of etc/passwd and etc/group. So if you want to migrate of restore a server you can use this script from a backup to restore and make the same users on you had.. Please feedback and comments. #!/bin/bash prompt_list () { # haal uit de argumenten de... (5 Replies)
Discussion started by: dannyvdberg
5 Replies

10. Shell Programming and Scripting

Create summery of al users + date

Hello, I have problem to write script which can collect users "username" and the time that each user has been created in our machine and store these data in file database.txt I have searched a lot and found we can see the exact time we create user with:passwd -S username also list user will... (3 Replies)
Discussion started by: nimafire
3 Replies
SIEVESHELL(1)						User Contributed Perl Documentation					     SIEVESHELL(1)

NAME
sieveshell - remotely manipulate sieve scripts SYNOPSIS
sieveshell [--user=user] [--authname=authname] [--realm=realm] [--password=password] [--exec=script] [--execfile=file] server[:port] sieveshell --help DESCRIPTION
sieveshell allows users to manipulate their scripts on a remote server. It works via MANAGESIEVE, a work in progress. The following commands are recognized: list list scripts on server. put <filename> upload script to server. get <name> [<filename>] get script. if no filename display to stdout delete <name> delete script. activate <name> activate script. deactivate deactivate all scripts. OPTIONS
-u user, --user=user The authorization name to request; by default, derived from the authentication credentials. -a authname, --authname=authname The user to use for authentication (defaults to current user). -r realm, --realm=realm The realm to attempt authentication in. -p password, --password=password The password to use when authenticating to server. Note that this parameter can be seen in the process list. Use with caution! -e script, --exec=script Instead of working interactively, run commands from script, and exit when done. -f file, --execfile=file Instead of working interactively, run commands from file file and exit when done. REFERENCES
[MANAGESIEVE] Martin, T.; "A Protocol for Remotely Managing Sieve Scripts", draft-ietf-managesieve-03.txt, Mirapoint, Inc.; May 2001, work in progress. AUTHOR
Tim Martin <tmartin@mirapoint.com>, and the rest of the Cyrus team <cyrus-bugs@andrew.cmu.edu>. perl v5.14.2 2014-06-03 SIEVESHELL(1)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy