Tuesday, 23 December 2014

How to unlock AD account at once

open Power shell as administartor

Run Below commands

Import-Module activedirectory

Search-ADAccount -Lockedout (To Show List of AD Account Locked)


Search-ADAccount -LockedOut | Unlock-ADAccount (For Unlock AD Account)

Thursday, 18 December 2014

ownership in linux

Ownership

#chown -R username /foldername
#chown username /filename

#chgrp -R groupname /file
#chgrp -R groupname /folder

Permission in Linux

Permission

user - 7
group - 7
other - 7

read - 4
write - 2
execute -1

For File
#chmod 777 /filename

For Folder
#chmod -R 777 /foldername

How to add user and group in Linux

How To Create/Delete User

# adduser harish ( To create user with name )
# passwd harish ( To set password of user )
# userdel harish ( To delete username )

cat /etc/passwd ( Location of user name file )

How to Create/Delete Group

# groupadd hr ( To create group with name )
# groupdel hr  ( To delete group )

cat /etc/group ( Location of group name )

How to add user in Group

# adduser harish hr ( add user in group )
# deluser harish hr ( delete user in group )

cat /etc/group ( Location of group and link with group name )

Note = ls -la ( To check the permission ) 

Wednesday, 17 December 2014

How To Change Forgotten Password On Ubuntu 14.04 Servers

Step -1 First power on your Ubuntu machine. At the boot menu, 
Step - 2 Press Esc to go in recovery mode
*Advanced options for Ubuntu
advanced options for ubuntu

Next, select Ubuntu, with the latest kernel version (recovery mode) to boot into. The recovery mode is used to recover your system on Ubuntu and perform other tasks like resetting your password and updating your system if you can’t boot into it.

advanced options for ubuntu boot menu

Then select the root option to drop into the root shell prompt. In this shell, you have read-only access. In order to run administrative commands, you must remount the shell with read and write permission.

advanced ubuntu boot menu

Next, remount the shell with read and write option. To do that, run the commands below.
mount -rw -o remount /
 After running the above commands,  the shell should be remounted with read/write permission. Now you can run limited sets of commends, including password change commands as the root user.
To change or reset your forgotten password, run the commands below.
sudo passwd username
Reboot and use normally

Monday, 15 December 2014

Could not update ICEauthoruity File In Centos

Note - No Need to worries you will fix in Minute

Step - 1 Insert DVD of OS

Step - 2 Go to Rescue Mode

Step - 3 chroot /mnt/sysimage

Step - 4 chown -R root:root *

Step - 5 chown gdm.gdm -R /var/lib/gdm

Step - 6 chmod 600 /var/lib/gdm/.ICEauthority

reboot