Thursday, May 16, 2013

Linux - user commond

# Add user
$/usr/sbin/useradd -d /home/njoonk -m njoonk -g njoonk

# Set password
$/usr/bin/passwd njoonk
# Delete user
$userdel testuser #Only a user.
$userdel -r testuser #Only a user with user's directory.

# Create a public in linux
$ ssh-keygen -t rsa
# Input the public-key into the authorized_keys
$ vi authorized_keys
$ chmod 644 .ssh/authorized_keys

No comments:

Post a Comment