Enable or Disable user/root account on Ubuntu 13.04 12.10 12.04 Debian

Enable or Disable user/root account on Ubuntu 13.04 12.10 12.04 Debian

ubuntu

1. Disable user/root on Ubuntu

root@ubuntu:~# passwd -l root
passwd: password expiry information changed.
root@ubuntu:~#
root@ubuntu:~# passwd -l kevin
passwd: password expiry information changed.
root@ubuntu:~#

Try to login with disabled user

ubuntu@ubuntu:~$ su kevin
Password:
su: Authentication failure
ubuntu@ubuntu:~$

2. Enable User/Account on Ubuntu

ubuntu@ubuntu:~$ sudo passwd kevin
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
ubuntu@ubuntu:~$ su kevin
Password:
$

3. Enable root account on Ubuntu

ubuntu@ubuntu:~$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
ubuntu@ubuntu:~$

That’s it. Thanks for using IThelpblog.com

 

 

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>