10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi ,
Can any please help the below requirement on all multiple servers and multiple dbs.
update configuration set value='yes' ;1)
the above statement apply on 31 Databases at a time on different Ip address
eg : 10.104.1.12 (unix ip address )
the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
2. Shell Programming and Scripting
Hello All,
The servers in question are AIX/Unix servers. I was hoping to find a scripting solution where I could use one server as a jump server and run a script that would check each server for a user account (the source file for the user accounts would be a text file or csv file) , and delete... (4 Replies)
Discussion started by: k45bryant
4 Replies
3. Shell Programming and Scripting
Hi,
I am running a shell script from a central server to multiple remote servers using the following code:
application_check()
{
# Linux/UNIX box with ssh key based login
SERVERS=`cat /tmp/server-details`
# SSH User name
USR="user"
# create new file
> /tmp/abc.log
# connect... (2 Replies)
Discussion started by: mystition
2 Replies
4. AIX
hi seniors
i want to create the users like when the user try to login it should not
should not promt for passwd is it possible to create users like this
please help me (6 Replies)
Discussion started by: senmak
6 Replies
5. Red Hat
Hi
Thanks in advance.
How to create a user without useradd command ?? (1 Reply)
Discussion started by: krish4linux
1 Replies
6. Solaris
i am trying to create a user on solaris 10. it is not taking user name with more than ten characters. which file i need to edit to do this setting. (4 Replies)
Discussion started by: raynu.sharma
4 Replies
7. Shell Programming and Scripting
I am trying to write a script to change passwords for the same user on multiple servers.
My environment runs purely ssh / scp not rsh / rcp and therefore coping using rcp is not an option.
I have been playing with expect to perform tasks but think there must be a better way.
Has anyone got... (7 Replies)
Discussion started by: stolz
7 Replies
8. Solaris
Hi all,
I want to create one user with full permissions to one directory called /opt/tivoli/tsm/client/ba/bin.
Name for the user Tivoli
Thanks & Regards
Babu (7 Replies)
Discussion started by: lbreddy
7 Replies
9. Shell Programming and Scripting
good day. i jsut wanted to know what is the best script or the best way changing a lot of Ip's in all servers. Do you have any idea? im using awk to change IP,what if, you have lots of servers. You need to change it one by one? It will take time to change it manually. (2 Replies)
Discussion started by: kenshinhimura
2 Replies
10. Shell Programming and Scripting
I have 85 Unix servers & I need to add single user ID on multiple servers at same time
Can anyone help in this?
I have written one script for single servers.same I need to user for multiple servers
#!/bin/sh
echo Enter user login ID
read loginID
echo Enter Group ID
read GroupID
... (6 Replies)
Discussion started by: sandeep_pan
6 Replies
useradd(8) System Manager's Manual useradd(8)
NAME
useradd - create a new user account
SYNOPSIS
useradd [-D binddn] [-P path] [-c comment] [-d homedir]
[-e expire] [-f inactive] [-G group,...] [-g gid]
[-m [-k skeldir]] [-o] [-p password] [-u uid]
[-U umask] [-r] [-s shell] [--service service] [--help]
[--usage] [-v] [--preferred-uid uid] account
useradd --show-defaults
useradd --save-defaults [-d homedir] [-e expire] [-f inactive]
[-g gid] [-G group,...] [-k skeldir] [-U umask] [-s shell]
DESCRIPTION
useradd creates a new user account using the default values from /etc/default/useradd and the specified on the command line. Depending on
the command line options the new account will be added to the system files or LDAP database, the home directory will be created and the
initial default files and directories will be copied.
The account name must begin with an alphabetic character and the rest of the string should be from the POSIX portable character class ([A-
Za-z_][A-Za-z0-9_-.]*[A-Za-z0-9_-.$]).
OPTIONS
-c, --comment comment
This option specifies the users finger information.
-d, --home homedir
This option specifies the users home directory. If not specified, the default from /etc/default/useradd is used.
-e, --expire expire
With this option the date when the account will be expired can be changed. expiredate has to be specified as number of days since
January 1st, 1970. The date may also be expressed in the format YYYY-MM-DD. If not specified, the default from /etc/default/useradd
is used.
-f, --inactive inactive
This option is used to set the number of days of inactivity after a password has expired before the account is locked. A user whose
account is locked must contact the system administrator before being able to use the account again. A value of -1 disables this
feature. If not specified, the default from /etc/default/useradd is used.
-G, --groups group,...
With this option a list of supplementary groups can be specified, which the user should become a member of. Each group is separated
from the next one only by a comma, without whitespace. If not specified, the default from /etc/default/useradd is used.
-g, --gid gid
The group name or number of the user's main group. The group name or number must refer to an already existing group. If not speci-
fied, the default from /etc/default/useradd is used.
-k, --skel skeldir
Specify an alternative skel directory. This option is only valid, if the home directory for the new user should be created, too. If
not specified, the default from /etc/default/useradd or /etc/skel is used.
-m, --create-home
Create home directory for new user account.
-o, --non-unique
Allow duplicate (non-unique) User IDs.
-p, --password password
Encrypted password as returned by crypt(3) for the new account. The default is to disable the account.
-U, --umask umask
The permission mask is initialized to this value. It is used by useradd for creating new home directories. The default is taken from
/etc/default/useradd.
-u, --uid uid
Force the new userid to be the given number. This value must be positive and unique. The default is to use the first free ID after
the greatest used one. The range from which the user ID is chosen can be specified in /etc/login.defs.
--preferred-uid uid
Set the new userid to the specified value if possible. If that value is already in use the first free ID will be chosen as described
above.
-r, --system
Create a system account. A system account is an user with an UID between SYSTEM_UID_MIN and SYSTEM_UID_MAX as defined in
/etc/login.defs, if no UID is specified. The GROUPS entry in /etc/default/useradd is ignored, too.
-s, --shell shell
Specify user's login shell. The default for normal user accounts is taken from /etc/default/useradd, the default for system accounts
is /bin/false.
--service service
Add the account to a special directory. The default is files, but ldap is also valid.
-D, --binddn binddn
Use the Distinguished Name binddn to bind to the LDAP directory. The user will be prompted for a password for simple authentica-
tion.
-P, --path path
The passwd and shadow files are located below the specified directory path. useradd will use this files, not /etc/passwd and
/etc/shadow.
--help Print a list of valid options with a short description.
--usage
Print a short list of valid options.
-v, --version
Print the version number and exit.
FILES
/etc/passwd - user account information
/etc/shadow - shadow user account information
/etc/group - group information
/etc/default/useradd - default values for account creation
/etc/skel - directory containing default files
SEE ALSO
passwd(1), login.defs(5), passwd(5), shadow(5), userdel(8), usermod(8)
AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils May 2010 useradd(8)