05-23-2008
useradd -u <uid> -g <gid> -G <GID> -c "test user" -d /var/abc/AB!CD!EF/error -m -s /bin/sh <user name>
here -G is no need.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can anyone explain the second and third fields in /etc/passwd.
Thanks. (2 Replies)
Discussion started by: nguda
2 Replies
2. UNIX for Advanced & Expert Users
Hello ppl,
A small mistake of mine has led the /etc/passwd file deleted. So i went to rescue mode and used the following command echo "root::0:0:Superuser:/:/bin/bash" > passwd
but that did not get effect in anyway way. when I switch back to normal mode the root is still asking for a passwd.... (3 Replies)
Discussion started by: cyno
3 Replies
3. Shell Programming and Scripting
I have left unix for a long time.Almost forget everthing.:(
Anybody can tell me what is the meaning?
wc /etc/passwd
9 16 1155 /etc/passwd
and
$ wc -l /etc/passwd
wc -l /etc/passwd
9 /etc/passwd (1 Reply)
Discussion started by: zhshqzyc
1 Replies
4. Shell Programming and Scripting
hi
How can I change the home directory of a user without using usermod -d command?
( by modifying /etc/passwd) (17 Replies)
Discussion started by: tjay83
17 Replies
5. Programming
I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories.
but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies
6. Solaris
Hi all
i am using solaris 10, i am creating user with
useradd -d/home/user -m -s /bin/sh user
user is created with in the following path
/export/home/user (auto mount)
i need the user to be created like this
(/home as default home directory )
useradd -d /home/user -m -s /bin/sh... (2 Replies)
Discussion started by: kalyankalyan
2 Replies
7. Solaris
Hi Folks,
I have Solaris 10, latest release.
We have passwd aging set in /etc/defalut/passwd.
I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging.
When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies
8. Shell Programming and Scripting
:(
---------- Post updated at 01:51 AM ---------- Previous update was at 01:50 AM ----------
Not working
---------- Post updated at 02:04 AM ---------- Previous update was at 01:51 AM ----------
cp -p /home/* home/exp/*.`date`
i am using this (4 Replies)
Discussion started by: rishiraaz
4 Replies
9. AIX
Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies
10. UNIX for Dummies Questions & Answers
I am trying to obtain all user accounts and their respective home directories.
/etc/passwd contains the required information, but I want to filter it to only show the uid,username and home directory path.
I am working on a Solaris 11 machine.
I made a little headway so far, but I got stuck... (7 Replies)
Discussion started by: Hijanoqu
7 Replies
LEARN ABOUT DEBIAN
passwd
PASSWD(5) File Formats and Conversions PASSWD(5)
NAME
passwd - the password file
DESCRIPTION
/etc/passwd contains one line for each user account, with seven fields delimited by colons (":"). These fields are:
o login name
o optional encrypted password
o numerical user ID
o numerical group ID
o user name or comment field
o user home directory
o optional user command interpreter
The encrypted password field may be blank, in which case no password is required to authenticate as the specified login name. However, some
applications which read the /etc/passwd file may decide not to permit any access at all if the password field is blank. If the password
field is a lower-case "x", then the encrypted password is actually stored in the shadow(5) file instead; there must be a corresponding line
in the /etc/shadow file, or else the user account is invalid. If the password field is any other string, then it will be treated as an
encrypted password, as specified by crypt(3).
The comment field is used by various system utilities, such as finger(1).
The home directory field provides the name of the initial working directory. The login program uses this information to set the value of
the $HOME environmental variable.
The command interpreter field provides the name of the user's command language interpreter, or the name of the initial program to execute.
The login program uses this information to set the value of the $SHELL environmental variable. If this field is empty, it defaults to the
value /bin/sh.
FILES
/etc/passwd
User account information.
/etc/shadow
optional encrypted password file
/etc/passwd-
Backup file for /etc/passwd.
Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools.
SEE ALSO
crypt(3), getent(1), getpwnam(3), login(1), passwd(1), pwck(8), pwconv(8), pwunconv(8), shadow(5), su(1), sulogin(8).
shadow-utils 4.1.5.1 05/25/2012 PASSWD(5)