[FUG-BR] Expirar conta usuario + shell

Vinícius Zavam egypcio em googlemail.com
Sábado Março 12 19:06:46 BRT 2011


2011/3/12 coopermine <coopermine em bol.com.br>:
>   Alguem sabe como criar uma conta com data para expirar?
>
>   tipo useradd -e [data] no linux?
>
>   Aproveitando o e-mail tem como cadastrar um usuario sem acesso nenhum
>   ao shell ou eu estou viajando na maionese?
>
>   David Coopermine

pw(8)

(...)

-e date	   Set the account's expiration date.  Format of the date is
		   either a UNIX time in decimal, or a date in `dd-mmm-yy[yy]'
		   format, where dd is the day, mmm is the month, either in
		   numeric or alphabetic format ('Jan', 'Feb', etc) and year
		   is either a two or four digit year.	This option also
		   accepts a relative date in the form `+n[mhdwoy]' where `n'
		   is a decimal, octal (leading 0) or hexadecimal (leading 0x)
		   digit followed by the number of Minutes, Hours, Days,
		   Weeks, Months or Years from the current date at which the
		   expiration date is to be set.

(...)

-s shell	   Set or changes the user's login shell to shell.  If the
		   path to the shell program is omitted, pw searches the
		   shellpath specified in /etc/pw.conf and fills it in as
		   appropriate.  Note that unless you have a specific reason
		   to do so, you should avoid specifying the path - this will
		   allow pw to validate that the program exists and is exe-
		   cutable.  Specifying a full path (or supplying a blank ""
		   shell) avoids this check and allows for such entries as
		   /nonexistent that should be set for accounts not intended
		   for interactive login.


-- 
Vinícius Zavam
profiles.google.com/egypcio


Mais detalhes sobre a lista de discussão freebsd