as you can accidentally delete system files or any other important files.
To create a user you need the root privilege (in some distributions you may need to prepend the sudo command everytime you want to execute a command that need root's privilege). if you're not root, you can become root with the su, you'll will be prompted to enter the root password.
if you're root. you can add a user with the command
useradd mike
that command will create a new user named mike, the useradd command will add a user entry in a file called passwd in the /etc directory.
mike:x:1003:1003::/home/mike:/bin/sh
Some versions of useradd aks you for details about hte user, such as the user's full name and password. if yours doesn't, you can change a user password by using the passwd command. Again, you need a root privilege, except you're changing your own password.
passwd amy
it will then propmts you for a new pasword, and then asks you to type it again to verify the change. if you've successfully change the user's password, it will be reflected in /etc/passwd entry as an encrypted string.
0 comments:
Post a Comment