Sei sulla pagina 1di 6

NAME shadow, getspnam - encrypted password file routines SYNTAX #include <shadow.

h> struct spwd *getspent(); struct spwd *getspnam(char *name); void setspent(); void endspent(); struct spwd *fgetspent(FILE *fp); struct spwd *sgetspent(char *cp); int putspent(struct spwd *p, FILE *fp); int lckpwdf(); int ulckpwdf(); DESCRIPTION shadow manipulates the contents of the shadow password file, /etc/shadow. The structure in the #include file is: struct spwd { char char long int long int long int long int long int long int unsigned long } *sp_namp; /* user login name */ *sp_pwdp; /* encrypted password */ sp_lstchg; /* last password change */ sp_min; /* days until change allowed. */ sp_max; /* days before change required */ sp_warn; /* days warning for expiration */ sp_inact; /* days before account inactive */ sp_expire; /* date when account expires */ int sp_flag; /* reserved for future use */

PSTREE NAME pstree - display a tree of processes SYNOPSIS pstree [-a] [-c] [-h -Hpid] [-l] [-n] [-p] [-u] [-Z] [-A -G -U] [pid user ] pstree -V DESCRIPTION pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees ro oted at processes owned by that user are shown.

pstree visually merges identical branches by putting them in square brack ets and prefixing them with the repetition count, e.g. init-+-getty -getty -getty -getty becomes init---4*[getty] Child threads of a process are found under the parent process and are sho wn with the process name in curly braces, e.g.icecast2---13*[{icecast2}] If pstree is called as pstree.x11 then it will prompt the user at the end of the line to press return and will not return until that has happened. This is useful for when pstree is run in a xterminal. OPTIONS -a swapped out, that process is shown in parentheses. -a implicitly disable s compaction. -A -c re compacted whenever possible. -G -h if the terminal doesnt support highlighting or if neither the current pr ocess nor any of its ancestors are in the subtree being shown. -H th -h, : -l nknown. -n Numeric sort.) -p r each process name. -p implicitly disables compaction. Show PIDs. PIDs are shown as decimal numbers in parentheses afte Sort processes with the same ancestor by PID instead of by name. ( Display long lines. By default, lines are truncated to the display width or 132 if output is sent to a non-tty or if the display width is u Like -h, but highlight the specified process instead. Unlike wi Use VT100 line drawing characters. Highlight the current process and its ancestors. This is a no-op Use ASCII characters to draw the tree. Disable compaction of identical subtrees. By default, subtrees a Show command line arguments. If the command line of a process is

-u the uid process

Show uid transitions. Whenever the uid of a process differs from of its parent, the new uid is shown in parentheses after the name.

-U -54 and and

Use UTF-8 (Unicode) line drawing characters. Under Linux 1.1 above, UTF-8 mode is entered on the console with echo -e \033%8 left with echo -e \033%@

-V PS -aux

Display version information.

Note that "ps -aux" is distinct from "ps aux". The POSIX and UNIX standards require that "ps -aux" print all processes owned by a user named "x", as well as printing all processes that would be selected by the -a option. If the us er named "x" does not exist, this ps may interpret the command as "ps aux" i nstead and print a warning. This behavior is intended to aid in transitioning ol d scripts and habits. It is fragile, subject to change, and thus should not be relied upon.

NAME passwd - update a users authentication tokens(s) SYNOPSIS passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warnda ys] [-i inactivedays] [-S] [--stdin] [username] DESCRIPTION Passwd is used to update a users authentication token(s). Passwd is configured to work through the Linux-PAM API. t initializes itself as a "passwd" service with Linux-PAM and utilizes con figured password modules to authenticate and then update a users password. A simple entry in the Linux-PAM configuration file for this service would be: # # passwd service entry that does strength checking of # a proposed password before updating it. # passwd password requisite \ /usr/lib/security/pam_cracklib.so retry=3 Essentially, i

passwd password required \ /usr/lib/security/pam_unix.so use_authtok #Note, other module-types are not required for this application to funct ion correctly. OPTIONS -k be for expired authentication tokens (passwords); the user wishes to keep their non-expired tokens as before. -l able to root only. The locking is performed by rendering the encrypted p assword into an invalid string (by prefixing the encrypted string with an !). --stdin This option is used to indicate that passwd should read the new p assword from standard input, which can be a pipe. -u password by removing the ! prefix. This option is available to root o nly. By default passwd will refuse to create a passwordless account (it wi ll not unlock an account that has only "!" as a password). The force op tion -f will override this protection. -d set the named account passwordless. Available to root only. -n users account supports password lifetimes. Available to root only. This will set the minimum password lifetime, in days, if the This is a quick way to disable a password for an account. It will This is the reverse of the -l option - it will unlock the account This option is used to lock the specified account and it is avail The option, -k, is used to indicate that the update should only

Remember the following two principles Protect your password. Dont write down your password - memorize it. In particular, dont wr ite it down and leave it anywhere, and dont place it in an unencrypted file! Use unrelated passwords for systems controlled by different or ganizations. Dont give or share your password, in particular to so meone claiming to be from computer support or a vendor. Dont let anyone watch you enter your password. Dont enter your password to a computer you dont trust or if things Use the password for a limited time and c

hange it periodically. Choose a hard-to-guess password. passwd will try to prevent you from choosing a really bad passwor d, but it isnt foolproof; create your password wisely. Dont use someth ing youd find in a dictionary (in any language or jargon). Dont use a n ame (including that of a spouse, parent, child, pet, fantasy cha racter, famous person, and location) or any variation of your personal or account name. phone number, license plate, or social security number) or your envir onment. Dont use a birthday or a simple pattern (such as backwards, follow ed by a digit, or preceded by a digit. Instead, use a mixture of upp er and lower case letters, as well as digits or punctuation. When cho osing a new password, make sure its unrelated to any previous password. Use long passwords (say 8 characters long). You might use a word pair wit h punctuation inserted, a passphrase (an understandable sequence of word s), or the first letter of each word in a passphrase. : Dont use accessible information about you (such as your

ulimit [-SHacdflmnpstuv [limit]] Provides control over the resources available to the shell and to processes star ted by it, on systems that allow such control. The -H and -S options specify tha t the hard or soft limit is set for the given resource. A hard limit cannot be i ncreased once it is set; a soft limit may be increased up to the value of the ha rd limit. If neither -H nor -S is specified, both the soft and hard limits are s et. The value of limit can be a number in the unit specified for the resource or one of the special values hard, soft, or unlimited, which stand for the current hard limit, the current soft limit, and no limit, respectively. If limit is omi tted, the current value of the soft limit of the resource is printed, unless the -H option is given. When more than one resource is specified, the limit name an d unit are printed before the value. Other options are interpreted as follows: -a

All current limits are reported -c The maximum size of core files created -d The maximum size of a process s data segment -f The maximum size of files created by the shell -l The maximum size that may be locked into memory -m The maximum resident set size -n The maximum number of open file descriptors (most systems do not allow this valu e to be set) -p The pipe size in 512-byte blocks (this may not be set) -s The maximum stack size -t The maximum amount of cpu time in seconds -u The maximum number of processes available to a single user -v The maximum amount of virtual memory available to the shell If limit is given, it is the new value of the specified resource (the -a option is display only). If no option is given, then -f is assumed. Values are in 1024byte increments, except for -t, which is in seconds, -p, which is in units of 51 2-byte blocks, and -n and -u, which are unscaled values. The return status is 0 unless an invalid option or argument is supplied, or an error occurs while setti ng a new limit.

: :

Potrebbero piacerti anche