Sponsored Content
Full Discussion: Useradd and passwd in HP-UX
Operating Systems HP-UX Useradd and passwd in HP-UX Post 302792913 by yadavricky on Thursday 11th of April 2013 10:12:12 AM
Old 04-11-2013
RedHat Useradd and passwd in HP-UX

Dear All,
I have Perl Script which previously running on solaris and now our system is moved to HP UX.

The script is creating the users on unix and database.

1. When we are creating the new user, useradd keep newly created account in locked state
2. In script we were using Passwd -u to unlock the account.

Now the issue is that in HP UX we don't have -u option with passwd cmd.

Can somebody guide me if we have some other utility which is replaced by passwd -u in HP UX.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

useradd

I work on some hp ux 11.00 Servers. i have to add an user. i use the useradd command like follows: useradd -u 72022 -g 71095 -c " comment " -d /PACKAGE_NAME/home/username -s /usr/bin/sh username The command returns with error 3. The manpage means value number 3: Invalid argument supplied to an... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies

2. UNIX for Advanced & Expert Users

useradd

Hi. due to some needs i gave a user the premission to use useradd command with sudo. i want to know if there is a way to let him set the initial password, without giving him the premission to use passwd command as root (sudo). maybe a way to set a default password for all the new users that... (2 Replies)
Discussion started by: dorilevy
2 Replies

3. Shell Programming and Scripting

useradd

Gurus, I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either. Regards (4 Replies)
Discussion started by: earlysame55
4 Replies

4. UNIX for Advanced & Expert Users

useradd?

Hi Experts, when using useradd command, what are the necessary options/arguments to be included? Please advice. (4 Replies)
Discussion started by: etcpasswd
4 Replies

5. Solaris

useradd

if useradd command is deleted in solaris how do we add user (3 Replies)
Discussion started by: vivek_ng
3 Replies

6. Solaris

passwd cmd reenables passwd aging in shadow entry

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

7. UNIX for Dummies Questions & Answers

passwd - useradd issues

hi guys I'm having these problems with these commands and I have not idea why # passwd If 'passwd' is not a typo you can run the following command to lookup the package that contains the binary: command-not-found passwd -bash: passwd: command not found # useradd temp Warning:... (15 Replies)
Discussion started by: karlochacon
15 Replies

8. Solaris

useradd

I want to creat a 27 logins in solaris.Can anyone tell me how to write a script for that so that i create at a time for all 27 people. Thanks to guide me. (6 Replies)
Discussion started by: kkalyan
6 Replies

9. Red Hat

useradd w/o write permission on /etc/passwd

Hi root user creates a user using the useradd command. This command creates an entry in the /etc/passwd file. /etc/passwd file has rw permission for the root user. Now, if I happen to remove the w permission for the root user, useradd command still is successfully creating entry in the... (3 Replies)
Discussion started by: guruprasadpr
3 Replies

10. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

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

NAME
usermod - modify a user account SYNOPSIS
usermod [-D binddn] [-P path] [-g gid [-o]] [-p password] [--service service] [--help] [--usage] [-v] account DESCRIPTION
usermod modifies an user account using the values specified on the command line. OPTIONS
-A, --add-to-group group,... With this option a list of 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. -c, --comment comment This option specifies the new users finger information. It is normally modified using the chfn(1) utility. -d, --home homedir This option specifies the new home directory of the user. -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. -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. -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. The user is removed from all other groups not specified. -g, --gid gid The group name or number of the user's new primary group. The group name must exist and a group number must refer to an already existing group. -l, --login name Specify the new account name for the user. The account name must begin with an alphabetic character and the rest of the string should be from the POSIX portable character class. Nothing else is changed. -m, --move_home Move the user's home directory to the new directory specified with the -d option. If the old directory does not exist, nothing is done. If the new directory already exists, the program aborts with an error. -o, --non-unique Allow duplicate (non-unique) User IDs. -p, --password password Encrypted password as returned by crypt(3) as the new password. -R, --remove-from-group group,... With this option a list of groups can be specified, from which the user should be removed. Each group is separated from the next one only by a comma, without whitespace. -s, --shell shell Specify user's new login shell. The value of shell must be a valid executable file. It is normally modified using the chsh(1) util- ity. -u, --uid uid Change the userid to be the given number. This value must be positive and unique (unless the -o option is used). Any file with the old UID of the user and which is located in the directory tree rooted at the user's home directory will be changed to be owned by the new UID automatically. -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. -L, --lock A system administrator can lock the account of the specified user. -U, --unlock A system administrator can unlock the specified account, if the account is not passwordless afterwards (it will not unlock an account that has only "!" as a password). -P, --path path The passwd and shadow files are located below the specified directory path. usermod will use this files, not /etc/passwd and /etc/shadow. --service service Modify the account from a special directory. The default is files, but ldap is also valid. --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. NOTES
usermod will not allow you to change the name, User ID or home directory of a user, which is logged in. usermod will not change the User ID of running processes and not the ownership of crontab and at jobs. FILES
/etc/group - group information /etc/passwd - user account information /etc/shadow - shadow user account information SEE ALSO
passwd(1), login.defs(5), group(5), passwd(5), shadow(5), useradd(8), userdel(8) AUTHOR
Thorsten Kukuk <kukuk@suse.de> pwdutils Feb 2010 usermod(8)
All times are GMT -4. The time now is 12:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy