HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
Adding User Name
- substitute user “root”
SuperUser (root) account is needed for adding Debian Packages.
su -
(RESULT)
cbkadal@osp:~$ su -
Password:
root@osp:~#
Adding UserName (E.g. dummy)
- Example, add a new user “dummy”.
- (exit) from “root”, back to user “cbkadal”.
adduser dummy
exit
(RESULT)
root@osp:~# adduser dummy
Adding user `dummy' ...
Adding new group `dummy' (1001) ...
Adding new user `dummy' (1001) with group `dummy' ...
Creating home directory `/home/dummy' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for dummy
Enter the new value, or press ENTER for the default
Full Name []: Dummy McDumbDumb
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
root@osp:~# exit
logout
cbkadal@osp:~$
Test user dummy
- Checking/print working directory (pwd)
- Substitute (su) user “dummy” from “cbkadal”
pwd
su - dummy
(RESULT)
cbkadal@osp:~$ pwd
/home/cbkadal
cbkadal@osp:~$ su - dummy
Password:
- Checking/print working directory (pwd)
- Exit from user “dummy” back to “cbkadal”
pwd
exit
(RESULT)
dummy@osp:~$ pwd
/home/dummy
dummy@osp:~$ exit
logout
cbkadal@osp:~$
Username with Capital Letter(s)
- Bad Name = an Account wiht capital letter(s)
- Eg. “CicakBinKadal”
- (Error)
adduser CicakBinKadal
(RESULT)
root@osp:~# adduser CicakBinKadal
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
- Force Badname
adduser --force-badname CicakBinKadal
(RESULT)
root@osp:~# adduser --force-badname CicakBinKadal
Allowing use of questionable username.
Adding user `CicakBinKadal' ...
Adding new group `CicakBinKadal' (1002) ...
Adding new user `CicakBinKadal' (1002) with group `CicakBinKadal' ...
Creating home directory `/home/CicakBinKadal' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for CicakBinKadal
Enter the new value, or press ENTER for the default
Full Name []: Bad Cicak Bin Kadal
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
root@osp:~#