September 27

Powershell Script to Grand user Home Folder permissions

$OU=”OU=kindergarten,OU=sales,OU=Students,OU=Users,OU=MonSchool,OU=Schools,OU=abcdUsers,DC=abcd,DC=ef,DC=com

$Group1=”CN=Students Ktest,OU=Groups,OU=abcUsers,DC=abcd,DC=ef,DC=com

Get-ADUser –SearchBase $OU –SearchScope 1 –LDAPFilter “(memberOf=$Group1)” | ForEach-Object { icacls “$(Join-Path ‘\\servera\sharedfolder\’ $_.SamAccountName)” /grant “$($_.SamAccountName):(OI)(CI)F” }

* Group1 is the group that the users belong to

NOTE: You can change the SearchScope to search the current path and all the children paths.
-SearchScope

Specifies the scope of an Active Directory search. The acceptable values for this parameter are:

  • Base or 0
  • OneLevel or 1
  • Subtree or 2

A Base query searches only the current path or object. A OneLevel query searches the immediate children of that path or object. A Subtree query searches the current path or object and all children of that path or object.

September 11

Wired Unmanaged – After Install Ubuntu desktop GUI on Ubuntu Server

 

With Ubuntu 18.04 Canonical introduced new network management called Netplan. In nutshell Netplan allows to directly configure network and/or switch between two network configuration daemons networkd and NetworkManager. By default networkd is configured for Ubuntu Server and NetworkManager for Ubuntu Desktop.

Go to   /etc/netplan/01-netcfg.yaml configuration file and change it:

FROM:




TO:

apply changes by executing:

$ sudo netplan apply

Category: Linux | LEAVE A COMMENT