473,378 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Add New User with Specific Expire Date

I want to add a user account to my linuxbox. But this user will have specific expire time which will be specified at the useradd definition.
Jun 8 '20 #1
2 3706
SioSio
272 256MB
The -e option of the useradd command specifies an expiration date.
useradd -e YYYY-MM-DD user1

Use the -D option to change the default expiration date.
useradd -D -e YYYY-MM-DD
Jun 9 '20 #2
You can use the -e and -f options like below.
$ useradd -e 2017-02-28 -f 60 john
Jun 11 '20 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Leo Custodio | last post by:
List members, I need some help on trying to acomplish a task under VB. My goal is to prevent a user from accessing features of my program after a certain amount of days (like an expire...
7
by: What-a-Tool | last post by:
How does the expire date work setting it server side with asp. I know with javascript setting it client side it will be set to the clients local time, and therefore expire when the clients local...
5
by: Bryan Yeo | last post by:
Trying to get the user password expire date from AD, but there is no such field. What I could get is the PasswordLastChanged property. Is there anyway I could calculate the date or something? ...
2
by: - Steve - | last post by:
I'm taking the value of the expire date out of an AD account (accountExpires attribute) and passing it into this function. static DateTime LargeIntToDateTime(ActiveDs.LargeInteger li) { long...
2
by: Li Pang | last post by:
User can changes his/her local date setting, i.e., "M/d/yyyy", "dd/MMM/yyyy", .... etc. which interprets the date (string type) in the different way. for example "02/05/2004" can be the second of May...
1
by: D. Dante Lorenso | last post by:
In a previous thread, it was determined that rather than use a table sequence for my primary key, I might consider using a compound primary key of customer_id and customer_seq where the...
1
by: easterbell | last post by:
Hi, My name is Easter. I am a software developer. I am working on an application in ASP.NET using C#. I am still kind of new to C# because I have been working with my company for about 2 months....
0
The1corrupted
by: The1corrupted | last post by:
Okay, here's the issue I'm confronted with. I have a chat system in the works and right now, I'm trying to make the display of it user-specific using at least one session variable. I want to...
5
by: Chris Noble | last post by:
A user account expiration date can be set using the following code // Use the DirectoryEntry.InvokeSet method to invoke the // AccountExpirationDate property setter. usr.InvokeSet(...
1
by: Akinyemi | last post by:
Hi, I started learning Java a year ago. Before then I had written a Visual Basic Program that maintains student information. I now want to write the same program in Java. But I do not know how to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.