I have been duplicating your comments on a second computer and can now see the differences for myself.
I cannot explain what may have caused these errors, but I assume they can easily be corrected from root shell, or are you suggesting the use of expiredate 1 below?
Quote:
-l, --lock
Lock the password of the named account. This option disables a password by changing it
to a value which matches no possible encrypted value (it adds a ´!´ at the beginning
of the password).
Note that this does not disable the account. The user may still be able to login using
another authentication token (e.g. an SSH key). To disable the account, administrators
should use usermod --expiredate 1 (this set the account's expire date to Jan 2, 1970).
Users with a locked password are not allowed to change their password.
[...]
-u, --unlock
Unlock the password of the named account. This option re-enables a password by
changing the password back to its previous value (to the value before using the -l
option).
I certainly have read the above many times, but did not feel happy to try the -l option for passwd as I have no idea what an SSH key is. Also I did read man usermod for expiredate 1, but thought I might be opening another "can of worms"?
I can see that the end is nigh, as I will have full confidence with expert guidance and it is a great way to learn!
i messed up while installing freebsd into a dual os wannabe system.
Now, how do i del it( so i wouldn't get prompted to choose freebsd during boot?)so that i could try installing a different flavour of linux?
cheers:eek: (1 Reply)
I created tar files for directories using this command:
tar -cvf * >tarfile
what happened was I got a file tarfile with a list of the files and it took the first file in each directory and overwrote it with the actual tar file. I've been trying to figure out since yesterday what I did... (2 Replies)
Hi
Guy,
In my system there were some cronjob were already scheduled. and somehow I want to enter one new cronjob with crontab. So I isssue crontab temp.txt. it scheduled that job but now it's showing me only this job with crontab -l. but I can not see the old cronjob list that already set up.... (2 Replies)
Dear Friends,
I have messed up with my .bashrc file (something I have deleted) and now i can't login back to system..
any Idea..
I can do login with other login and password.. but I dont have root password because of security reason...
If I ask root then It will take about 4 -5 days to go... (4 Replies)
Ok, a couple weeks ago I was fixing a cron report about perl not happy with 'locale' info (LANG and LC not set). As a result, I was experimenting with setting the correct 'locale' in several areas (like /etc/sysconfig/i18n and who knows where). Somehow after a reboot, as soon as the OS starts... (3 Replies)
Hi,
Just wanted to know if anyone else has noted that the time-stamp in the history is all out of whack.:eek:
I've Ubuntu, all patched, and when I ran history, it showed me commands that I ran few weeks ago with today's date. Is this normal?
Here is a snippet:
....
85 2010-06-09 09:03:31... (6 Replies)
Help!!
Seem to have messed up my path, as I keep getting command not found error. Could someone please tell whats wrong or how to fix it.
export PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:$PATH
---------- Post updated at 08:34 PM ---------- Previous update was at 07:50 PM ----------
... (1 Reply)
I have AIX 5.3 with oracle 10g ( test server). While trying to create RAW disk for Oracle ASM I have accidentally messed with rootvg (hdisk0 & hdisk1)
When I do
# lspv hdisk0
0516-066 : Physical volume is not a volume group member.
Check the physical volume name specified. ... (4 Replies)
OK, so I just messed myself up. Thinking the /var/opt/ignite/data/INDEX files was static, I manually edited the file and added 2 more OS's to it. During an Install it only showed the first OS (started with 11.31, 3 versions then added a 11.23, and a 11.11 stanza's).
The 11.23 and 11.11 never... (2 Replies)
Discussion started by: mrmurdock
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)