Blog Archives

Scripting the passwd command in Linux and Unix

As you know the passwd command is interactive, so it cannot be used in scripts in it’s basic form. As you know, when you type passwd, you are asked to type the password twice. $ sudo passwd mike Enter new

Tagged with: , , , , , , ,
Posted in The Linux and Unix Articles!

How to lock and unlock a user account in Linux

When you need to forbid a user to login the Linux system, you lock that user’s account. There are a few ways to do that. The simplest way to lock a user is with the passwd command. Without any option,

Tagged with: , , , , ,
Posted in The Linux and Unix Articles!

How to create users in Linux with the generical useradd command

The useradd command is generical for all the Linux distros: Syntax: useradd [options] username Creating users with the default configuration: $ sudo useradd yoda $ grep yoda /etc/passwd yoda:x:1010:1012::/home/yoda:/bin/sh To view the default options for creating users, use useradd -D

Tagged with: , , , ,
Posted in The Linux and Unix Articles!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!