To Login Linux Server as a root user

টিউন করেছেনঃ | প্রকাশিত হয়েছেঃ 4:30 AM | টিউন বিভাগঃ


Login localhost: root
Password: redhat

[root@cslit~]#                                      root user’s home directory

To Login Linux Server as  a normal user (robin):
Press: Alt + Ctrl + F2

Login localhost: robin
Password: robin’s password

[robin@cslit~]$                                     robin user’s home directory
--------------------------------------------------------------------------------------------
[root@cslit~]# adduser robin
[root@cslit~]# passwd robin
[root@cslit~]# adduser sathi
[root@cslit~]#passwd sathi
[root@cslit~]# adduser rani
[root@cslit~]#passwd rani
[root@cslit~]# adduser sumon
[root@cslit~]# passwd sumon
[root@cslit~]# cat /etc/passwd
[root@cslit~]# groupadd computer
[root@cslit~]# groupadd electronics
[root@cslit~]# groupadd civil
[root@cslit~]# cat /etc/group
[root@cslit~]# gpasswd –M robin,sumon  electronics
[root@cslit~]#gpasswd –M rani, sathi computer
[root@cslit~]# cat /etc/group
[root@cslit~]# cd /
[root@cslit /]# mkdir rhel6
[root@cslit /]# cd rhel6
[root@cslit rhel6]# mkdir computer electronics
[root@cslit rhel6]# ls
[root@cslit rhel6]# touch student
[root@cslit rhel6]# touch teachers
[root@cslit rhel6]# ls
[root@cslit rhel6]# ls  -l
[root@cslit rhel6]# cp student student_list
[root@cslit rhel6]#cp teachers teachers_list
[root@cslit rhel6]#ls
[root@cslit rhel6]# cp /etc/passwd  /rhel6
[root@cslit rhel6]# ls
[root@cslit rhel6]# cat  passwd
[root@cslit rhel6]# cat /etc/passwd
[root@cslit rhel6]# mv passwd userlist
[root@cslit rhel6]# ls
[root@cslit rhel6]# ls –l
[root@cslit rhel6]#cd computer
[root@cslit computer]# pwd
[root@cslit computer]#cd ..
[root@cslit rhel6]# cd –
[root@cslit computer]# cd /
[root@cslit /]# cd
[root@cslit ~]# cat /etc/passwd

  Robin   :x:  500:500:student :/home/robin:/bin/bash
 



Username  Password  UID   GID  comment       user’s home directory    user’s shell

[root@cslit ~]#
Alt + Ctrl + F1 = Graphics Terminal (GUI)
Alt + Ctrl + F2 - Alt + Ctrl + F7 = Command Terminal
[root@cslit ~]# hostname
Cslit
[root@cslit ~]#hostname server
[root@cslit ~]#hostname
Server
[root@cslit ~]# tty
[root@cslit ~]# who
[root@cslit ~]#w
[root@cslit ~]#whoami
[root@cslit ~]# cd /home
[root@cslit home]# ls
[root@cslit home]#userdel robin
[root@cslit home]# ls
[root@cslit home]# cat /etc/passwd
[root@cslit home]# userdel –r sumon
[root@cslit home]# ls
[root@cslit home]# cat /etc/passwd
[root@cslit home]# groupdel computer
[root@cslit home]# cat /etc/group
[root@cslit ~]# cd /rhel6
[root@cslit rhel6]#ls
[root@cslit rhel6]# cp userlist computer
[root@cslit rhel6]# rmdir electronics   (for empty directory)
[root@cslit rhel6]# rm –r  electronics (directory contain + questions)
[root@cslit rhel6]# rm –rf electronics (directory contain without question)
[root@cslit rhel6]# rm userlist (file delete with question)
[root@cslit rhel6]#  rm –f userlist (file delete without questions, forcely)
[root@cslit rhel6]# rm –rf  * (delete all files and directories from current location)
[root@cslit rhel6]# init 0 (shutdown)





Previous
Next Post »
Designed by MS Design

Powered by Blogger