I'm trying to add an expiration to all of the local logins, but everytime I do the:
usermod -e <date> <login>
command, I get a error msg "usermod error <date> is not a valid expiration date. CHoose another"
I've tried 6/26/06, June 26, 2006, 26/6/06, 6/26/2006 everything I can think of.
... (1 Reply)
Hi, I put an expiration on a few id's that I want to remove now. From the man page
-e expire Specify the future date on which a login can no
longer be used; after this date, no user will be
able to access this login. This option is useful
... (0 Replies)
Hi,
I would need to modify my machine name :
When i give "w" command, i am getting following message
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
krishnag pts/59 gunasekar 1:25pm 25:15 0.03s 0.03s -csh.
My questions is, i need to change FROM (i.e... (1 Reply)
I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Hello,
I'm a bit confused by the usage of those two commands. I have 2 freshly installed systems and the behaviour is different from one system to another.
root@systemONE rolemod -G mygroup postgres
UX: rolemod: ERROR: Users most be modified with ``usermod''.
root@systemTWO usermod -G... (6 Replies)
Hi;
Im working on HP -UX B.11.11 U 9000/800 , I come from a Linux background and i m not so good at HP UX.Here is the issue
I need to reset the password of some 100 users at one go ,on linux I used to do it.I wrote a small code in linux and it worked a charm
here is the code ,where... (2 Replies)
I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email.
original solaris... (2 Replies)
Hello All,
Could you please let me know if the usermod command works in AIX? If yes, on what versions? We have a situation in which we need to change the UID of few users who have the same UID as root. We have changed it in /etc/passwd for now but want to use usermod in future. The syntax is as... (2 Replies)
Hi,
I use a software which can create account on many system or application.
One of resource which is managed by this soft his a server SUSE Linux Enterprise Server 10 (x86_64). patch level 3.
This application which is an IBM application use ssh to launch command to create account in... (3 Replies)
i install Solaris 11.2 , Oracle Corporation SunOS 5.11 11.2 April 2015
and make 2 zones for Oracle RAC
non-global zones : rac1, rac2
in zones i create group's and user's
/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1020 asmadmin
/usr/sbin/groupadd -g 1021... (2 Replies)
Discussion started by: penchev
2 Replies
LEARN ABOUT SUSE
usermod
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)