Interview questions :-
1. How do u force a user to change password on next login in linux?
A. chage -d 0 "User"
2.What command can be used to findout server architechure (x86 or x64) apart from uname?
A. arch
3. How do u findout the users who are NOT logged in for more than 30 days? which file u will check?
A. last , lastlog, /var/log/wtmp
4. whats is called 1.5 stage in boot process of linux?
A. Which contains extra code to allow cylinders above 1024, or LBA type drives, to be read. The 1.5 boot loader is stored (if needed) in the MBR or the boot partition.The great thing about GRUB is that it includes knowledge of Linux file systems. Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux kernel from an ext2 or ext3 file system. It does this by making the two-stage boot loader into a three-stage boot loader. Stage 1 (MBR) boots a stage 1.5 boot loader that understands the particular file system containing the Linux kernel image. Examples include reiserfs_stage1_5 (to load from a Reiser journaling file system) or e2fs_stage1_5 (to load from an ext2 or ext3 file system). When the stage 1.5 boot loader is loaded and running, the stage 2 boot loader can be loaded."
So Basically,
Stage 1 Boot loader is MBR
Stage 2 Boot loader is GRUB
Stage 1.5 Boot loader is e2fs_stage1_5 (Basically this module will load the knowledge of Filesystem to Grub to read the kernel)
5. When u try to create a file, u got a error that "No space available". But actually space available on volume? How do u resolve this issue?
A. Try this df -i list inode information instead of block usage [Perhaps are you out of inodes on this file system.], To "rectify it", remove unwanted files or move them somewhere else.]
6. How do reset the un successful login count of a user in linux? how
do u enable this feature?
A. I found that under RHEL / CentOS Linux 5.x, you need to modify
/etc/pam.d/system-auth file. You need to configure PAM module
pam_tally.so. Otherwise faillog command will never display failed
login attempts.
vi /etc/pam.d/system-auth
auth required pam_tally.so no_magic_root
account required pam_tally.so deny=3 no_magic_root lock_time=180
How do I display all failed login attempts for user suresh?
faillog -u suresh
Display faillog records for all users.
faillog -a
How do I reset the counters of login failures?
# faillog -r
# faillog -r -u suresh <-- only reset counter for suresh user
1. How do u force a user to change password on next login in linux?
A. chage -d 0 "User"
2.What command can be used to findout server architechure (x86 or x64) apart from uname?
A. arch
3. How do u findout the users who are NOT logged in for more than 30 days? which file u will check?
A. last , lastlog, /var/log/wtmp
4. whats is called 1.5 stage in boot process of linux?
A. Which contains extra code to allow cylinders above 1024, or LBA type drives, to be read. The 1.5 boot loader is stored (if needed) in the MBR or the boot partition.The great thing about GRUB is that it includes knowledge of Linux file systems. Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux kernel from an ext2 or ext3 file system. It does this by making the two-stage boot loader into a three-stage boot loader. Stage 1 (MBR) boots a stage 1.5 boot loader that understands the particular file system containing the Linux kernel image. Examples include reiserfs_stage1_5 (to load from a Reiser journaling file system) or e2fs_stage1_5 (to load from an ext2 or ext3 file system). When the stage 1.5 boot loader is loaded and running, the stage 2 boot loader can be loaded."
So Basically,
Stage 1 Boot loader is MBR
Stage 2 Boot loader is GRUB
Stage 1.5 Boot loader is e2fs_stage1_5 (Basically this module will load the knowledge of Filesystem to Grub to read the kernel)
5. When u try to create a file, u got a error that "No space available". But actually space available on volume? How do u resolve this issue?
A. Try this df -i list inode information instead of block usage [Perhaps are you out of inodes on this file system.], To "rectify it", remove unwanted files or move them somewhere else.]
6. How do reset the un successful login count of a user in linux? how
do u enable this feature?
A. I found that under RHEL / CentOS Linux 5.x, you need to modify
/etc/pam.d/system-auth file. You need to configure PAM module
pam_tally.so. Otherwise faillog command will never display failed
login attempts.
vi /etc/pam.d/system-auth
auth required pam_tally.so no_magic_root
account required pam_tally.so deny=3 no_magic_root lock_time=180
How do I display all failed login attempts for user suresh?
faillog -u suresh
Display faillog records for all users.
faillog -a
How do I reset the counters of login failures?
# faillog -r
# faillog -r -u suresh <-- only reset counter for suresh user