setting account (linux)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting setting account (linux)
# 1  
Old 09-19-2008
setting account (linux)

hi
How can I set an account so that it expires at a particular date?
# 2  
Old 09-19-2008
man chage
# 3  
Old 09-19-2008
first I have to create user with useradd and than chage.
right?

Can I do it in one command?
# 4  
Old 09-19-2008
If you are creating a new user, try adding this flag in useradd:
Code:
-e date

# 5  
Old 09-19-2008
so I dont need to use chage right?
# 6  
Old 09-19-2008
New user - set using useradd
Existing user - change with chage
# 7  
Old 09-19-2008
how can I get the date as a parameter from the user in a specific format.

For example:
enter date:
if user enters 01-02-2008

it must be automatcally converted to 2008-02-01

because I need "yyyy-mm-dd" format

Last edited by tjay83; 09-19-2008 at 01:02 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Allow AD service account SSH to Linux systems without 2FA

I have Windows AD server and all of the linux computers are joined to AD. Recently, 2FA has been activated, I wish to exclude some of the domain service accounts from 2FA # less /etc/pam_radius_acl.conf sshd:* # /etc/pam.d/sshd auth required pam_sepermit.so auth requisite... (0 Replies)
Discussion started by: davidpar007
0 Replies

2. UNIX for Dummies Questions & Answers

How do i list all locked account in linux?

Hi How do i list all locked account in my linux distributiion I have tried passwd -S -a but it seems to not working . My distribution details. # lsb_release -a LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: OracleVMserver... (3 Replies)
Discussion started by: pinga123
3 Replies

3. Red Hat

User account migrate from solaris to linux

Hi, I have to move user account from solaris to Linux environment because I don't want user to create password again in Linux environment, so could somebody confirm me how to do it, I know there are files /etc/groups, /etc/passwd and /etc/shadows need to copy but somebody confirm me what is the... (2 Replies)
Discussion started by: mnaumanca
2 Replies

4. UNIX for Dummies Questions & Answers

Setting up FTP account

Hi, I am new to the workd of FTP administration. I was asked to make an account on our FTP server so that someone can only download and upload to his home directory. The account is made but what settings/cconfiguration can I verify to ensure that the user has access to his home directory only?... (1 Reply)
Discussion started by: mojoman
1 Replies

5. UNIX and Linux Applications

How to delete a user account in linux bases application.

Hi, Can anyone please guide me how can I remove/block a user from a server access. /usr/sbin/adduser -d /home/john john echo ****** | passwd --stdin john I used the above command to add a user "john". How do I delete and block john. Appreciate your responses.... (2 Replies)
Discussion started by: sureshcisco
2 Replies

6. Linux

How to delete a user account in linux bases application.

Hi, Can anyone please guide me how can I remove/block a user from a server access. /usr/sbin/adduser -d /home/john john echo ****** | passwd --stdin john I used the above command to add a user "john". How do I delete and block john. Appreciate your responses. (1 Reply)
Discussion started by: sureshcisco
1 Replies

7. UNIX for Dummies Questions & Answers

How to reactivate expired account in Linux as a root user

I am an administrator of a Red Hat Enterprise Linux system. Now one account expired. I wonder how to reactivate the account. Thanks (2 Replies)
Discussion started by: cy163
2 Replies

8. UNIX for Advanced & Expert Users

Problem setting up Bash user account

Hi, We have a unix user account with login shell as ksh. Now we want to migrate our jobs to a new user account having bash as its login shell. For the old account we had a .env file which set up a lot of aliases and did a few other useful things. It seems this file was executed the on logging... (2 Replies)
Discussion started by: sumanroyc
2 Replies

9. Shell Programming and Scripting

configure User account in linux

Got the answer as it can be done using yast tool in SUSE linux (0 Replies)
Discussion started by: jambesh
0 Replies

10. UNIX for Dummies Questions & Answers

Setting an account to be a non-login account automatically?

Is there a way to easily change an account to be a non login account (NP in the shadow) file? I know I can just edit the file but that is not what we want to do. We use access control software and want to provide a way to set an account to be non-login using simple commands that can be mapped... (0 Replies)
Discussion started by: LordJezo
0 Replies
Login or Register to Ask a Question