09-15-2012
You don't really need a script for this. Put the things you want to be created when a user is created in /etc/skel/, and new users will get it. In this case, I guess you'd want a public_html directory with a .htaccess file containing Options Indexes
Read man useradd for details.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need some help making this script... I guess I'm having trouble even interpretating what to even get started on...
I need to create a script that will search a given directory (typically a user's home directory, but not necessarily) as provided on the command line and any sub-directors for... (2 Replies)
Discussion started by: Jukai
2 Replies
2. Shell Programming and Scripting
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies
3. Shell Programming and Scripting
echo -e "Enter in a username : \c"
read username
grep "^$username:" /etc/passwdWhat I'm trying to do is take in a username from my script and I need to be able to check if that username already exists. If it does the script should display a message saying that the user already exists and exit.
... (2 Replies)
Discussion started by: shadowcat
2 Replies
4. BSD
I want to create a shell script for a menu selection consisting of users defined on the machine. To an administrator having the privileges, the selection menu will look as follows:
Select the user you want to define the variables for:
1) my-username-1
2) my-username-2
etc
Then there would be a... (7 Replies)
Discussion started by: figaro
7 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I wants to create the users for multiple machine from single main server using the shell script ,can you please help me on this.... (2 Replies)
Discussion started by: Rahulne25
2 Replies
6. Shell Programming and Scripting
Hello Everybody
i am a newbie to the bash scripting.please can someone help me out here.i want to write a script on creating 10 users with passwords and comparing the users to the ones in /etc/passwd file.am i gonna use arrays in creating the 10 users or what?and again, how do i compare both... (1 Reply)
Discussion started by: bruno_brunt
1 Replies
7. Shell Programming and Scripting
I need somebody who could help with an exercise.
You have a text file called users.txt with this info inside:
users.txt:
user1:1234:/home/homedir1 ;
user2:1234:/home/homedir2 ;
user3:1234:/home/homedir3 ;
user4:1234:/home/homedir4 ;
The script should create an user using the... (2 Replies)
Discussion started by: marcosruiz
2 Replies
8. Red Hat
Hi friends could you please share me the script to create more users in one server except newusers, is there any option to change secondary group and how to print passwd and changing the age all these things how can i edit in newsers.. please help me (0 Replies)
Discussion started by: indiankrish
0 Replies
9. Shell Programming and Scripting
for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ;
PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ;
echo "$PassWord@123" | passwd $UserName --stdin ; done
can some one explain what the bold text do
Please use... (5 Replies)
Discussion started by: James0806
5 Replies
10. HP-UX
Hi,
I have a file with usernames, and the comment section, e.g :
Data removed by request of sanchitadutta91, 20 May 2020
I need to add these users into a server. Is it possible to use a script to create the users, together with the comment ?
From the commandline to add one user, the... (2 Replies)
Discussion started by: anaigini45
2 Replies
LEARN ABOUT CENTOS
bashbug
BASHBUG(1) General Commands Manual BASHBUG(1)
NAME
bashbug - report a bug in bash
SYNOPSIS
bashbug [--version] [--help] [email-address]
DESCRIPTION
bashbug is a shell script to help the user compose and mail bug reports concerning bash in a standard format. bashbug invokes the editor
specified by the environment variable EDITOR on a temporary copy of the bug report format outline. The user must fill in the appropriate
fields and exit the editor. bashbug then mails the completed report to bug-bash@gnu.org, or email-address. If the report cannot be
mailed, it is saved in the file dead.bashbug in the invoking user's home directory.
The bug report format outline consists of several sections. The first section provides information about the machine, operating system,
the bash version, and the compilation environment. The second section should be filled in with a description of the bug. The third sec-
tion should be a description of how to reproduce the bug. The optional fourth section is for a proposed fix. Fixes are encouraged.
ENVIRONMENT
bashbug will utilize the following environment variables if they exist:
EDITOR Specifies the preferred editor. If EDITOR is not set, bashbug defaults to emacs.
HOME Directory in which the failed bug report is saved if the mail fails.
TMPDIR Directory in which to create temporary files and directories.
SEE ALSO
bash(1)
AUTHORS
Brian Fox, Free Software Foundation
bfox@gnu.org
Chet Ramey, Case Western Reserve University
chet@po.cwru.edu
GNU Bash-4.0 1998 July 30 BASHBUG(1)