This should work in newer bash and ksh.
Additional error handling should be done against utilities used against accounts.
Hope that helps
Regards
Peasant.
hi ,
I need to know commands to be used in the script to invoke batches in order from other scripts and then run those batches,and how to take those logs of those batches which fails........If anyone give me a better idea to complete this entire task in a single script... (5 Replies)
Hi there,
I need sh script to create a backup per domain and then ftp each file
to different host.
let's say I have bunch of domains in /var/www/vhosts/
so when sh will be executed it will create something like
domain.com.tar.gz
domain2.tar.gz
Can somebody help?
Thank you, Dmitry (0 Replies)
Hello,
I'm Have 1 Question abut
if i need to run another script in my bash script by example
/scripts/killacct this script for cpanel but when i try to execute this command
/scripts/killacct username he ask me yes or no any idea to answer on this question with yes in my bash script
I'm... (2 Replies)
Hi all,
I would need a rather simple bash backup script that loops throught the (local) users and for each users backs up (cp!) its /home/username folder.
About the functionalities:
The script has to run every 2 hours (that's cron, so don't mind about that) and the files should be copied to... (12 Replies)
Hi
I have a script that performs a process on a file.
I want to know how to include a function to run a batch of files?
Here is my script
#!/bin/bash
#----------------------------------------------------------------------------------------------------------------------
#This... (2 Replies)
Basically it's for a work assignment.
Have to make a menu with the following choices
***************menu*********************
1) Show Current Directory
2) Dispaly Current Time and Date
3) Copy
4) Change Password
5) write directory to file
6) Edit File Directory
7) Make backup from... (1 Reply)
Hello, I'm supposed to create a simple script to backup onto a network using tar and scp -r command as well as the ~.bashrc to designate commands as a part of bash. I am having trouble making mine work. I would like to ask for input as to what I may be doing wrong. Here it is:
!/bin/bash
#
#... (1 Reply)
HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here
Im explaining the requirement of script.
AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
This is the problem: Write a script that will make a backup of a file giving it a ‘.bak’ extension & verify that it works. I have tried a number of different scripts that haven't worked and I haven't seen anything really concise and to the point via google. For brevity's sake this is one of the... (4 Replies)
How to get cpanel backup data in rescue mode?
Server OS 6.3 minimal with cPanel
/dev/sdb1 is main partition
root@rescue ~ # fdisk -l
Anyone can help
Thank you (0 Replies)
Discussion started by: jaydul
0 Replies
LEARN ABOUT DEBIAN
sync-accounts-createuser
SYNC-ACCOUNTS-CREATEUSER(8) chiark utilities SYNC-ACCOUNTS-CREATEUSER(8)NAME
sync-accounts-createuser - helper/hook program for sync-accounts
SYNOPSIS
SYNCUSER_CREATE_var=value... sync-accounts-createuser
DESCRIPTION
sync-accounts-createuser is invoked by sync-accounts when sync-accounts is creating a local account.
It must perform all of the tasks involved with local account creation except for the actual changes to the password, shadow and group data-
bases.
At the very minimum, it must create the new account's home directory (with appropriate permissions). The supplied sync-accounts-createuser
script does exactly that.
It may also suggest to sync-accounts modifications to the new account's passwd entry.
INVOCATION
When sync-accounts-createuser is invoked, the passwd and group entries will not yet have been set up, so it may not rely on them. sync-
accounts-createuser will not be supplied with any arguments. However, the following environment variables will be set, giving details
about the account to be created:
SYNCUSER_CREATE_USER
SYNCUSER_CREATE_UID
SYNCUSER_CREATE_GID
SYNCUSER_CREATE_COMMENT
SYNCUSER_CREATE_HOME
SYNCUSER_CREATE_SHELL
RESULTS
sync-accounts-createuser should usually produce no output.
It can inhibit the creation of the user by outputting a single line not containing a colon; in this case, a diagnostic message will be
written to sync-accounts's logfile, and the user will be skipped.
Alternatively, it may write out an alternative password file entry, in which case sync-accounts will use the supplied data for the local
passwd file instead of that from the remote host. The line should be in Sys-V passwd file format (regardless of localformat or remotefor-
mat settings). The username field should be taken from SYNCUSER_CREATE_USER, and the password field should be x.
EXIT STATUS
0 All went well, or we wrote a line without a colon to say that the account should not be created.
any other
There were serious problems and sync-accounts should bomb out immediately.
FILES
None.
ENVIRONMENT
See above.
BUGS
The supplied sync-accounts-createuser does not check that it was not supplied with any arguments; nor does it check that the SYNCUSER_CRE-
ATE_* variables are set, or have sensible values.
AUTHOR
sync-accounts-createuser and this manpage were written by Ian Jackson <ian@chiark.greenend.org.uk>. They are Copyright 1999-2002 Ian Jack-
son <ian@davenant.greenend.org.uk>. This manpage forms part of the sync-accounts package.
sync-accounts-createuser and the sync-accounts package are free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, consult the Free Software Foundation's
website at www.fsf.org, or the GNU Project website at www.gnu.org.
SEE ALSO sync-accounts(8), sync-accounts(5), passwd(5)Greenend 14th July 2002 SYNC-ACCOUNTS-CREATEUSER(8)