Sponsored Content
Top Forums Shell Programming and Scripting help to create script for added date to list users Post 302522910 by vbe on Tuesday 17th of May 2011 03:57:54 AM
Old 05-17-2011
Perhaps you used a bad approach...
Consider giving here the script you wrote explaining where you are stuck or what you dont know how to do, then say "how can I solve this problem?". If you look at the forum you will see that more you give information and show what you are doing, more replies (and good ones...) you get. You don't expect others to do your work, no?
 

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
BADSECT(8)						    BSD System Manager's Manual 						BADSECT(8)

NAME
badsect -- create files to contain bad sectors SYNOPSIS
badsect bbdir sector ... DESCRIPTION
The badsect utility makes a file to contain a bad sector. Normally, bad sectors are made inaccessible by the standard formatter, which pro- vides a forwarding table for bad sectors to the driver. If a driver supports the bad blocking standard it is much preferable to use that method to isolate bad blocks, since the bad block forwarding makes the pack appear perfect, and such packs can then be copied with dd(1). The technique used by this program is also less general than bad block forwarding, as badsect cannot make amends for bad blocks in the i-list of file systems or in swap areas. On some disks, adding a sector which is suddenly bad to the bad sector table currently requires the running of the standard DEC formatter. Thus to deal with a newly bad block or on disks where the drivers do not support the bad-blocking standard badsect may be used to good effect. The badsect utility is used on a quiet file system in the following way: First mount the file system, and change to its root directory. Make a directory BAD there. Run badsect giving as argument the BAD directory followed by all the bad sectors you wish to add. (The sector num- bers must be relative to the beginning of the file system, but this is not hard as the system reports relative sector numbers in its console error messages.) Then change back to the root directory, unmount the file system and run fsck(8) on the file system. The bad sectors should show up in two files or in the bad sector files and the free list. Have fsck(8) remove files containing the offending bad sectors, but do not have it remove the BAD/nnnnn files. This will leave the bad sectors in only the BAD files. The badsect utility works by giving the specified sector numbers in a mknod(2) system call, creating an illegal file whose first block address is the block containing bad sector and whose name is the bad sector number. When it is discovered by fsck(8) it will ask ``HOLD BAD BLOCK ?''. A positive response will cause fsck(8) to convert the inode to a regular file containing the bad block. DIAGNOSTICS
The badsect utility refuses to attach a block that resides in a critical area or is out of range of the file system. A warning is issued if the block is already in use. SEE ALSO
fsck(8) HISTORY
The badsect utility appeared in 4.1BSD. BUGS
If more than one sector which comprise a file system fragment are bad, you should specify only one of them to badsect, as the blocks in the bad sector files actually cover all the sectors in a file system fragment. BSD
June 5, 1993 BSD
All times are GMT -4. The time now is 01:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy