Friday, February 10, 2023

Microsoft Does it again the Windows7 way

Microsoft , Apple and Google not necessarily in the specific order but have never failed to amaze us in our life time more than once. 

Well we have seen a lot of history from Disk keeping data in MB's and size of Huge Cabinets to keeping data in Cloud and from from typing in huge mechanical keyboards to typing on glass. We have come thus far and trust me the journey is gonna be much more interesting than we can image.

Well we all had our fun time with how everything has evolved and remember the days when we used to make fun on windows way back after say Windows 98 where everything crashed and felt really buggy and then most of us (me included) made comments like this is what happens when you copy the code from some one. 

Well, Microsoft slapped everyone back with Windows 7 and everyone mark my words everyone was delighted to work on Windows 7. Now what did MS do that hit us all on the face and why was the OS so amazing. Along with the hard work that MS did we need to understand we smoothly had transitioned from 32bit to 64bit in the background. 

Now let's address the Elephant in the Room shall we. 

Who is leading the search since inception(let's just say we all started to google). Google was not the first search engine it was not a new idea but the idea was to get relevant results according to your query. And over last 3 decades the quality of the queries have changed. People ask more specific questions and that cannot be a single page or website result. Now everyone knew this but no one was working on it. 

I mean when was the last time you were doing something and you found all your results in the same page. I have to go back and forth on a lot of content to get some information be it code or history or farming. Now Microsoft spilled the Beans at the right time when people started getting taste of ChatGPT for drawing and writing code and creating websites and some trying to instil a word of fear that people in IT will loose jobs MS built the new search with AI assisted chat. 

And that's not even the beginning to what they did they integrated it with everything possible and with just one finishing touch MS did it again what they did more than a decade ago and Status Quo is back to MS and for the first time in history for search. 

I am not sure that is gonna short lived or gonna introduce a new jargon 'Bing it' but Google for sure does not have the answer to it yet. And please do not get started on Bard powered by Lambda and this is gonna be a huge news for really long. 


Well, whatever it was we are gonna get dumber in remembering and reading things as we know the information is a step away but our answers and approach to a problem are gonna get really interesting. 

And we may for first time in history of search start paying for search. Yea you got that right ChatGPT is charging $20 for monthly so I think the new trend has already been set and with the ind of results provided it will not be possible to stay away from it. 


Thanks,

Tushar 








Friday, August 5, 2022

New Colours for Hayabusa

Hey you lovely people out there.

Hope you all are doing well and rocking like me. Well it has been a phenomenal year in terms of a lot of things for me but today I am not gonna speak about me. It is about the new colours announced for every one's dream bike. 

Yes we are taking about Suzuki GX1300R or better names as Hayabusa. Well we have seen three colours of the Mighty Hayabusa in the 3rd Generation and they have been earned a lot of accolades for that.


Pearl Brilliant White Metallic Matte Stellar

                    
Metallic Matte Sword Silver Candy Daring Red


                    
Glass Sparkle Black Candy Brunt Gold
But now in 2023 Suzuki is going to release three new colours for th Gen3 Hayabusa and it looks stunning. 
The first one is Pearl Vigour Blue/Pearl Brilliant White colour


The second one is  Metallic Matt Black/Glass Sparkle Black
                                        

The 3rd new colour which is my favourite and I think I am gonna book this one is 
Metallic Thunder Gray / Candy Daring Red



Now there is an option in Japan that you can order rims and accent colour of your choice. 

 
Which means you can choose your own base colour Matt Black and your choice of accent colour like daring candy red which is the best combination of all the colours. 

Let me know what do you think and which one will be your favourite colour. 


Thanks,
Tushar 






















Thursday, May 19, 2022

Planting Trees for retirement?? Something's you should know

 Hi Peeps,

So you must have heard that planting trees for retirement is one of the best investments you can do. However there may be some confusion around it that you need to know about the forest department as well. 

So, basically you can purchase the tree saplings from any private nursery or from forest department. The forest department does give saplings for free during sometimes of the year. But irrespective you can plant trees and no one can have any issues till the saplings are planted in a property owned by you. 

Now, the real question is when you want to harvest the trees to encash you cannot do that without prior information to forest department. So, prior notice in written or any application form needs to be submitted to forest department with legal documentation of the land in your name and the amount of trees that you wana harvest. That will be followed by a visit from forest department and they will charge very nominally and give you a written documentation stating your legal right to harvest and sell the trees. 

Well, that was simple considering how many people did try to scare me away from doing this project. 

I think the ways of working in Government Organizations have improved and been organized over last couple of decades. 

Happy Farming!! 

Thanks,

Tushar Kanti

Thursday, February 3, 2022

Wana Query all tables in SQL DB

 Hey Sqeeps,

I was running an upgrade today and had to jump a major version while upgrade (from 2008R2 to 2019). I know not yet on 2022. It takes time for old joints to move. :) 

Well there was a small hiccup that there were a lot of tables in the db and I need to run some sanity check before I could hand over the database to the development team. 

So thought of putting together a small cursor which should help anyone with read permissions to run a sanity check on all tables in the databases. 



Well that runs like a monster and takes for ever so modified the query to take just 1000 rows from each table. 


Hope this helps SQeeps. 


Untill Next time,

Cheers,

Tushar

Thursday, January 20, 2022

Creating PDF from iPhone

 Well hello,

First post in 2022. As usual this is related to one of the requirements I had recently. I wanted to convert an image to pdf. 

There are a lot of paid apps which can do the same. Unless you want to take a screen shot automatically and then convert them to pdf, somewhat like iscanner app. You just need to open the pages native app and copy the image you want to convert to pdf. Then just click on the ellipsis and use the export option to convert to pdf. 

Sometimes I feel there should be a microblog where we just put a couple of lines in a short blog to the point what it can be used for. What do you think let mw know in comments below.

Thanks,

Tushar

Wednesday, November 10, 2021

Dark Theme for Windows Outlook and SSMS

 Well Black is the new Red... What can I say.. I think it clears a lot of clutter and you feel focused on the right things. 

Right to the meat. 

nnn

For Switching Dark Mode in Windows 10. Just search for "Dark Theme" in Cortana and you should get the below option 

Just change the present setting to Dark and you should be golden. 


Next Outlook . Goto File->Options->General

Here you will find a setting Personalize your copy of Microsoft Office 


Next SSMS ->

First open a notepad with  "Run as Admin". Then open the file ssms.pkgundef and find the line "Remove Dark Theme". 




You should find the file in C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE. I have version 18 hence this path you can do a search for the file in "program files (x86) folder". Once you find the line just comment the line with "//" without the quotes as shown in the image below. 

Once done save the file and then open the SSMS. Goto

Tools->Options->Environment->General->Colour Theme-> Dark




So these are the three essential things I needed the black theme for.                                                        
Let know what application you need black theme for.                                                                              


Thanks,                                                                                                                                                        
Tushar                                                                                                                                                                

Thursday, October 28, 2021

AutoScroll using Python

 So there are times when you want your screen to autoscroll. Well I just have a function where I need to play a guitar and the song is too long for me to remember all the chords and I cannot scroll when I am playing the guitar. Hence the requirement. The solution was too naïve than what I thought it would. 


You pop up your favourite Python IDE and add import the package pyautogui  this is the Hero of our solution. 

For most of us using Windows with Powershell you should have python installed. So just goto your powershell and type py.exe 





Now install the pyautogui module. 

py -m pip install pyautogui

Now go to your python shell and write the below code. 



Hope this helps. 


Thanks,

Tushar


Thursday, September 30, 2021

Better than tempered glass for iPhone 12 Pro Max

 Hi Guys,

You must be going crazy to get your hands on a good tempered glass for your iPhone 12 Pro Max or 13 Pro Max. The only thing you get in the market is a tempered glass for front screen and a PU material for back cover. 

This is a place which I found over internet and then started using the cover for the last one month. 

https://millioncases.com/collections/iphone-12-pro-max/products/iphone-12-pro-max-luxury-square-metal-frame-case?variant=40447805063330


This is a very good cover with magnetic sides and protects both front and back cover. I have never used a cover before on any phone but this product has a glass back cover and there is no tempered glass available for back cover of iPhone Pro Max. Hence had to take this option. 


Hope this helps everyone. Bye till we meet again.

Thanks,

Tushar Kanti

Tuesday, June 15, 2021

Shayad Chords

Shayad is a very special song from the Movie Luv Aaj Kal 2(the movie should have been christened as Luv Aaj Kal 0.5  😈 )

Sung by Arijit where he also plays the Acoustic Guitar. Music by Pritam 


[Chords]: Em , Am , D , G , Bm , C

 [Intro]

C               D               G

Shayad kabhi na keh sakoon main tumko

Am        D             Em

Kahe bina samajh lo tum shayad

C           D               G

Shayad mere khayal mein tum ik din

Am         D             Em

Milo mujhe kahin pe ghum shaayad

          G                 C

Jo tum na ho... rahenge hum nahin

          Em            D

Jo tum na ho... rahenge hum nahin

  Bm            C                   G

Na chahiye kuch tum se zyada tum se kam nahin

          Em                D

Jo tum na ho... toh hum bhi hum nahi

          C                 D

Jo tum na ho... toh hum bhi hum nahi

  Bm            C                   G

Na chahiye kuch tum se zyada tum se kam nahin

 

 

[Verse 1]

Bm

Aankhon ko khaab dena

C

Khud hi sawaal karke

G                   D

Khud hi jawaab dena teri taraf se

Bm

Bin kaam kaam karna

C

Jaana kahin ho chaahe

G                   D

Har baar hi guzarna teri taraf se

   G                    C

Ye koshishein toh hongi kam nahin

   Em                   D

Ye koshishein toh hongi kam nahin

  Bm            C                   G

Na chahiye kuch tum se zyada tum se kam nahin

          G                 C

Jo tum na ho... rahenge hum nahin

          Em            D

Jo tum na ho... rahenge hum nahin

  Bm            C                   G

Na chahiye kuch tum se zyada tum se kam nahin


The Full Song Lyrics:

 Shayad kabhi na kehe sakoon main tumko


Kahe bina samajh lo tum shayad

Shayad mere khayal mein tum ik din

Milo mujhe kahin pe ghum shayad


Jo tum na ho... rahenge hum nahin

Jo tum na ho... rahenge hum nahin

Na chahiye kuch tum se zyada tum se kam nahin


Jo tum na ho... toh hum bhi hum nahi

Jo tum na ho... toh hum bhi hum nahi

Na chahiye kuch tum se zyada tum se kam nahin


Aankhon ko khaab dena

Khud hi sawaal karke

Khud hi jawaab dena teri taraf se

Bin kaam kaam karna

Jaana kahin ho chaahe

Har baar hi guzarna teri taraf se


Ye koshishein toh hongi kam nahin

Ye koshishein toh hongi kam nahin

Na chahiye kuch tum se zyada tum se kam nahin


Jo tum na ho... rahenge hum nahin

Jo tum na ho... toh hum bhi hum nahin

Na chahiye kuch tum se zyada tum se kam nahin


Jo tum na ho...

Jo tum na ho...

Jo tum na ho...

Saturday, April 24, 2021

Scripting Domain Logins , Server Roles , Database User and User Permissions.

 Hi Guys,

Been so long I did post something. Well I really need to work on my clould blog as well but for today it will be just a simple blog on user security. 


I had to run through a lot of hoops so thought I will share the scripts with you. The requirement was to script out the Logins and the related users in the databases from one environment to other. 

So here goes the script. You need to replace the  [domain\windowslogin] with you DomainLogin for which you want to script out the permission. 

IF  (SELECT OBJECT_ID('msdb.dbo.storepermission') ) IS  NULL

begin

CREATE TABLE msdb.dbo.storepermission  (

ServerName sysname,

DBName sysname,

USerName sysname,

TypeOfLogin nVARCHAR(100),

PermissionLevel NVARCHAR(100),

TypeOfRole NVARCHAR(100)

)

END 

TRUNCATE TABLE msdb.dbo.storepermission


DECLARE @@login_name sysname ='domain\windowslogin'

--SELECT @@login_name

DECLARE @dbname VARCHAR(50)   

DECLARE @statement NVARCHAR(MAX)


DECLARE db_cursor CURSOR 

LOCAL FAST_FORWARD

FOR  

SELECT name

FROM master.sys.databases

WHERE 1=1

AND state_desc='online' 

OPEN db_cursor  

FETCH NEXT FROM db_cursor INTO @dbname  

WHILE @@FETCH_STATUS = 0  

BEGIN  

--SELECT @@login_name

SELECT @statement = 'use '+@dbname +';'+ 'insert into msdb.dbo.storepermission(ServerName,DBName,USerName,TypeOfLogin,PermissionLevel,TypeOfRole)SELECT


 ServerName=@@servername, dbname=db_name(db_id()),p.name as UserName, p.type_desc as TypeOfLogin, pp.name as PermissionLevel, pp.type_desc as TypeOfRole 


FROM sys.database_role_members roles


JOIN sys.database_principals p ON roles.member_principal_id = p.principal_id


JOIN sys.database_principals pp ON roles.role_principal_id = pp.principal_id

where p.name=''domain\windowslogin''' -- Change the user name


EXEC sp_executesql @statement

PRINT @statement


FETCH NEXT FROM db_cursor INTO @dbname  

END  

CLOSE db_cursor  

DEALLOCATE db_cursor





 SELECT 'IF NOT EXISTS(SELECT principal_id FROM sys.server_principals WHERE name = ''domain\windowslogin'') BEGIN CREATE LOGIN [domain\windowslogin] FROM WINDOWS  END; '

 

SELECT

--R.name AS server_role

-- , P.name AS role_member ,

'EXEC master..sp_addsrvrolemember N' + '''' + P.name + '''' + ', N' + '''' + R.name + '''' + ';' AS command

FROM sys.server_role_members RM 

INNER JOIN sys.server_principals P ON RM.member_principal_id = P.principal_id

INNER JOIN (SELECT principal_id, name FROM sys.server_principals WHERE type_desc = 'SERVER_ROLE') R

ON RM.role_principal_id = R.principal_id

WHERE P.name NOT LIKE '#%'

AND P.name NOT LIKE 'NT %'

AND P.type_desc <> 'SERVER_ROLE'

AND P.name NOT IN ('sa')

AND P.name='domain\windowslogin'

ORDER BY R.[name], P.[name]


SELECT 'use '+DBName+' IF NOT EXISTS(SELECT principal_id FROM sys.database_principals WHERE name = '''+USerName+' '') BEGIN CREATE USER ['

+USerName+'] FOR LOGIN ['+ USerName+'] END ; EXEC sp_addrolemember N'''+PermissionLevel+''', N'''+USerName+''';'

 FROM msdb.dbo.storepermission


Hope this helps you. 


Thanks,

Tushar

Wednesday, February 24, 2021

Updating the Domain Credentials from Remote Desktop System

 Hi,

I have had so many opportunities when I had to change my passwords but I did not remember how to get the change password console in the remote system.

So without further adieu let me give you the shortcut to the password change console.

This works with Windows Server 2016 so I assume it will work with most of the newer versions.


The shortcut is [cntrl] + [alt] + [end]


So you will be able to see this console and then you just need to click on the Change a password option and the change password console will open up. 

Hope this helps you next time when you want to reset a password for your domain logon from a remote desktop system.


Thanks,

Tushar Kanti


Thursday, February 11, 2021

Getting Lazy is Getting Comfortable or Getting Old

 Hey,

Been a month already into new year and I have not put in anything in my favourite blog. You know what I think after sometime we start to find happiness everywhere and that is where we start getting mature and start behaving matured. One we understand that we need to get money to pay bills and two we know where to get easy money(keeping a day job) and where to get real money aka investment in real estate, travel blogging, basically following your passion not limited to your study or bathroom :)


So we all have developed some basic skills (IT Support is not a skill we develop it's like we were enslaved into it), like Technology, Music, Art; and it is good enough to pay for our real bills but we have put in so much of planning small things that we are losing the larger picture. 

Or may be just me.. lol.. 

So you wana get up early and strech out and then you see the guitar giving you the sad stare and then when you start tuning the guitar to play you start to think that the code you left running in production last night might have completed and you will need to enable the job which you disabled to check the issues in the data consistancy. And trust me by the time you login to the VPN to connect you realize your phone is out of juice and just when you plug in the charger you realise that the socket is still broken which you had to fix but then you forgot to get the screw driver which was broken.. and on and on... and suddenly you realise your kid is up. 


You get it right that we have been amazingly undisciplined in our life so when we try to work on something i.e. we want to take a step ahead in our life with anyone of our so called passions we need to take atleast a couple to steps back and then revise things and then take a step forward. This has been a gift of the habbit of fast food generation that we are. We need things super fast but we do not realise that patience is one thing that we need to have in anything that we want to achieve. 


So I think we need to slice our life (hey not literally just a time slice will do)  and then use those slices to make most of it. We need to make sure that every slice is fun and we need to have more of it. 


So initially it will all be boring and slow and may be it will not make sense but I think it will work out pretty well soon. I used to play the guitar and I still am there but now I do not play to go somewhere I just play to play and to enjoy what I can do with it. Singing is something I have lost the touch but I miss that the most. I mean so many things to do in just one life. 


Of all the things that I have lost I miss my time the most. But it's just been 10 years that I been like this and I think I will turn around, stronger than before. 


Tushar





Wednesday, September 2, 2020

How IT is fixing the mistakes and evolving

HI, 

So what did change in the world of IT for the past 2 decades? Well literally everything right from the keyboard and mouse (became wireless) to monitors became flatter and thinner and brighter. But today wanted to bring something more basic to discuss. You know we all keep talking about AI and Machine Learning if you back just a decade and relook the comments on posts of those articles you will see most of the industry would have commented that is still in it's inception and it will take forever and next generation will be able to harness the benefits. Guess what AI and Machine learning are here and they are defining how we are working towards achieving our daily and annual goals. 


So the industry roughly had the IT boom like 2 decades ago when companies like Apple and Microsoft started making hardware and software for people like us. Now all was good people started to accept new technologies and all started to get IT Aware but somewhere mid stream people started to tame the RockStars of the IT as slaves and people with absolutely no skills and information started to drive the IT Industry and this led to the whole chaos which we live in today. And if you watch closely all the major flaws and mistakes came in picture only when the mass hiring of engineers started to happen(I am no exception to that process but I gladly accept that). Now imagine someone having absolutely no clue in Operating System having a Mechanical Degree in Engineering designing a WebPage for an online e-commerce portal. Image how buggy that system designed will be some of us will argue that they have had great mentors and great books and blogs to refer. But imagine the mistakes they did and got passed on to their subordinates and juniors like the ripple or the domino effect. We are living with those mistakes in everything in IT, you can pick anything even as basic as Nomenclature to as big as Network configuration. All is messed up and you know the biggest contribution to this chaos is from the companies who boast to Marvel in the field of IT. And you cannot even get started about how much I love the BSc and Commerce graduates coming into IT. 


Well this would have never ended and we would have just cursed the hardware ( I mean you also have mechanical engineers designing MicroProcessors chips but let's just say that is really a handful and they ended up there because of their shear passion and dedication and not some mass recruitment). I mean there is no end to how much you can scale up (both horizontally and vertically) as long as you can drain some more money from the poor client who believes the IT companies know more than them about Computers. May be once in a year we should look at some of the specs of the Rovers that went across planets to gather data. I mean if you look at the hardware they had and the software written we should feel not only ashamed but guilty of how much we need to know even before we start writing the first "Hello, World!" program. 

Somewhere down the line came up with a brilliant Idea of having setup Infrastructure in Cloud and this can be the start of correcting the mistakes we did in our Infrastructure and I believe it will take some time to get the morons out of the Industry who are only surviving because they can point out mistakes in someone's work or share a warm mug of coffee with someone important. 

Now we have infrastructure as an Application you can built a failover over cluster with click of buttons and the amazing part is you will be getting the almost best thing possible. I know it takes away customisation out of the picture but given what we are dealing as of now that can be really helpful. So what about the software well that is changing too and we have web based workflow applications which can stitch our work together to fetch the data do the ETL and create reports. This is shaping up really fast and we cannot keep up with all the providers coming out with new tools and designs literally everyday. 

We can create a service without thinking about the server core and memory. You can create the service and just change the tier when you hit a bottle neck. The only downside is the cost which I think is wise keeping your own infra which gets obsolete every 5years. 

What we will witness and MARK MY WORDS WE WILL. The next decade will be the evolution of people working in IT. To begin with the Ways of Working will change. No one will be required to work from Office unless you want to. People will be working from the place they like and will have a device which they like to work on. You will see the desktops replaced by mobile tablets and meetings getting boring as the audience will change. Yes people will start working with smaller entities which reflect more of their personal nature rather than having to work monotonically in IT Giants. Kids are learning coding today to create applications so when they hit the IT industry a decade later we will have but no room for people who think just sitting around quietly having a warm mug of coffee will keep their jobs safe. Or someone who has a habit of rubbing nose into everyones work with no contribution whatsoever will have to sadly go home and find something more useful to do with their lives. People will start to speak for themselves in IT which is taken care of by just a bunch of people who take the accolades and demean the hardworking people. 

You will stop saying the jargon YOU NEED TO BE A SMART WORKER. I mean literally the only people speaking these words in IT Giants are the dumbest people I have witnessed in my life. 

We will always have C Perl Python Ruby Java in some form or another. You will need to know the basis of the working of a Hardware and Software before you start working on anything and Kids are learning that now and when they hit the Industry and trust me the only ones entering will be the ones who will be the RockStars only to kick some ass. They will take no BS whatsoever and will only work if they think they will have something to contribute. I mean people will need to make money to keep paying bills but now we all know earning money does not mean working for 8 hours and definitely not in something we do not like to. 

Change is the only thing Permanent


Thanks,

Tushar 


   

Wednesday, February 12, 2020

MagicMouse2 in Windows 10

Well I had been looking forward to getting my hands on Microsoft Surface Arc Mouse for a real long time. But when the time came I had to rethink. In fact I ordered the same and returned the package as it was the Version 1 released sometime in 2016. So when I got a chance to reorder the same I did an overall study and comparison between Surface Arc Mouse and Apple Magic Mouse 2. I chose the later one. There are a quite a bit of things that stand out for Apple Magic Mouse 2 and it's my personal opinion.

Enough of history. Now for the real reason of this blog is to keep or help Windows 10 users get the driver for Apple Magic Mouse 2 so that they can work with Scroll functionality of the mouse. I had to do some study for whole day and then realised there are a couple of ways we can do it. I chose the paid one as well but then it struck me I do not want to pay for some driver and run some third party tool on my Windows just to make a mouse function properly. I hunted down the driver (well it was a couple of hours of googling and downloading). I have put it on a public folder and anyone can download and use it.

So here is the direct link to the ftp location for MagicMouse2 driver for Windows10.

Cheers!!!!

Tushar Kanti


Monday, June 10, 2019

How to grant a local user the access to restart a service

Hi Guys,
Been sometime. Have been working for a project for a close friend of mine. (Yea I am doing some consulting finally). And there have been a plethora of things I did for the project which I wanted to blog on but then time is always against us.

I found this topic interesting and challenging and the work done (after a lot of reading and understanding) was pretty simple. So mentioning the same in today's blog.


We are going to change the permission of a user(local user) to restart a service in a non-domain controlled server. i.e. not connected to an Active directory.

By default a local user will not have permissions to restart a service. If a user goes to the services console(services.msc) he/she will see the start and stop functions to a service being grayed out.
Now to grant him the permissions we can use a lot of ways which is described quite well in the blog 

I did not want to use any third party software and complete the activity using simple pwershell commands. I am assuming the service name to be "Somefoobarservice" and the local user to be "tushar" (just for the name sake).

We need to open an powershell window as an admin. (just right click on the powershell and click on run as admin). Once you have the powershell opened use the command "sc.exe" . This utility is used to communicate with Service Control Manager and Services. You can just type sc.exe to give a help on the utility.


We need to first understand which user has what permissions on the service. We will use the sdshow option for sc.exe utility which will display the service security options.

example : sc.exe sdshow "Somefoobarservice"

you will get an output like the below

D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)

Now it may seem a lot gibberish but it will make sense once we discuss the output.

The first letter in the beginning of the output
S: — System Access Control List (SACL)
D: — Discretionary ACL (DACL)

The first letter after brackets means: allow (A) or deny (D).

The next set of symbols is assignable rights.

CC — SERVICE_QUERY_CONFIG (request service settings)
LC — SERVICE_QUERY_STATUS (service status polling)
SW — SERVICE_ENUMERATE_DEPENDENTS
LO — SERVICE_INTERROGATE
CR — SERVICE_USER_DEFINED_CONTROL
RC — READ_CONTROL
RP — SERVICE_START
WP — SERVICE_STOP
DT — SERVICE_PAUSE_CONTINUE


The last 2 characters are objects (user group or SID) that are granted permissions. There is a list of predefined groups.


AU Authenticated Users
AO Account operators
RU Alias to allow previous Windows 2000
AN Anonymous logon
AU Authenticated users
BA Built-in administrators
BG Built-in guests
BO Backup operators
BU Built-in users
CA Certificate server administrators
CG Creator group
CO Creator owner
DA Domain administrators
DC Domain computers
DD Domain controllers
DG Domain guests
DU Domain users
EA Enterprise administrators
ED Enterprise domain controllers
WD Everyone
PA Group Policy administrators
IU Interactively logged-on user
LA Local administrator
LG Local guest
LS Local service account
SY Local system
NU Network logon user
NO Network configuration operators
NS Network service account
PO Printer operators
PS Personal self
PU Power users
RS RAS servers group
RD Terminal server users
RE Replicator
RC Restricted code
SA Schema administrators
SO Server operators
SU Service logon user

Now I hope the gibberish statement makes much sense. Now is the task to identify the user SID. This is the unique id for which the user has to be granted permissions. Now we can do it a lot of ways. I am trying to pen down the easiest. 
You just type the below command using WMIC ( Windows Management Interface Command).
 wmic useraccount get name,sid
This will list the users and the SID for all the users. you need to copy the SID of the user you want to grant permission to the service. 
Guest           S-1-5-21-2719496566-3729557865-1934094733-501
tushar        S-1-5-21-2719496566-3729557865-1934094733-1011
Something like the above. Now we use the SID of tushar and then update the service "Somefoobarservice" using the utility sc.exe again. This time we will use the utility sdset which sets a service's security descriptor.
Before that we will have to prepare the new security descriptor for the service. Here we will append the new descriptor of the service for tushar to the orignal one( this will help retain the previous user permissions on the service). 

The original descriptor
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
The new descriptor for tushar. Here we are granting permissions to read the service, start, stop, restart and pause the service. 
(A;;CCLCSWLOCRRCRPWTDT;;;S-1-5-21-2719496566-3729557865-1934094733-1011)
So the new descriptor is (augmenting the new one for tushar to the orignal one, ensure there is no space) 
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWLOCRRCRPWTDT;;;S-1-5-21-2719496566-3729557865-1934094733-1011)

Now time to update the service(remember the powershell should be running as admin)
sc.exe sdset "Somefoobarservice"  "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWLOCRRCRPWTDT;;;S-1-5-21-2719496566-3729557865-1934094733-1011)"
Once done you will get a message like "[SC] SetServiceObjectSecurity SUCCESS".
Viola !!! Now the local user has permissions to start, stop, restart and pause the service like an admin. This is one of the ways you can have controlled permissions for a user on a particular service rather than granting him admin permissions on the server. 


Thanks,
Tushar 
























Tuesday, January 1, 2019

New Year 2019

Hi Guys,
It has been some time I have stopped working on my blogs and since the time I did I missed out on something I was passionate about and stopped growing technically. I believe sharing makes you grow more than keeping things to yourself. I promise I will blog more and share more this year.

There are a lot of things I am working on in parallel but not limited to cloudera, sql and aws. I will try to share my experience as much as I can.


Thanks,
Tushar Kanti

Monday, December 25, 2017

The iDream

Since 2008 Apple announced the amazing range of products be it iPod Touch or iPhone or Macbook. I always wanted to lay my hands on one of those. There were times I was envious of the people owning them as they returned from onsite(oh let's not go into the details of meritocracy for the same). I finally decided to have one. The Macbook air can still be explained as because of the  products they have for creativity which is some how shunned in windows but most importantly the feel of having a Macbook is far more awesome.
Also got a iPhone to add flavor to the fun and trust me it is much more hyped that for real. Sure the form factor and the mental satisfaction you have is unparalleled but other than that it is just a phone. When we have so many good build phones coming in less than half of the price value it is definitely a major waste of money. But yes after using it for a couple of months given a chance I will not be willing to go back to Android and Hell Never to Windows phones. But most the credit to this shift of phone is to Nokia for not doing, what was required in time. 


Thanks,
Tushar 

To configure the local loop back adapter in vmware

To install the Loopback adapter:

Click Start > Control Panel > Add Hardware.
Click Next on the introduction dialog box.
Select Yes, I have already connected the hardware and click Next.
Select Add a new hardware device, and click Next.
Select Install the hardware that I manually select from a list (Advanced), and click Next.
Select Network adapters, and click Next.
Select Microsoft as the manufacturer, select Microsoft Loopback Adapter as the adapter, and click Next.
Click Next to confirm the installation.
Click Finish to complete the installation.

To configure the newly created adapter:

Click Start > Control Panel > Network Connections.
Select the newly created connection (named Local Area Connection #, where # is its order number).
Right-click on the selected connection and choose Properties from the menu.
Confirm that Microsoft Loopback Adapter or Microsoft Loopback Adapter # is displayed in the Connect Using: field. If it is not, return to step 2 and retry properties for another adapter.
Deselect everything except Internet Protocol (TCP/IP).
Select Internet Protocol (TCP/IP), and click Properties to open Internet Protocol (TCP/IP) Properties.
Select Use the following IP address:. Fill in the IP address: and Subnet mask: fields. For example, 10.10.10.10, 255.255.255.0.
Click Advanced to open Advanced TCP/IP Settings.
Switch to WINS and select Disable NetBIOS over TCP/IP.
Click OK to close Advanced TCP/IP Settings.
Click OK to close the Internet Protocol (TCP/IP) Properties.
In Windows XP only, Deselect Notify me when this connection has limited or no connectivity to remove the connection warning icon from the system notification area.
Click OK to close the connection properties.

Slowness Syndrome

Have you ever felt the need to fuel the jet??  Do you know what it feels like to drive at 40kmph when you have witnessed 180kmph? That should give you a taste of what it feels like when you need to brake and slow down in pressure of society. Well this is what one can feel a lot of times. People here don't wana walk they just wana stroll and trust me when you wana run they will pull you back. Be it back bitching be it hideous politics oh yes sir they are bound to these abilities you won't find any where. Why can't people go fast and ahead and why can't they let go of their laid back attitude. People who should have been friendly and homely have grown wild and try to make people uneasy and unhappy and it's a shame they find happiness in that. I feel a lot suffocated but have to put on a visage so that all feel I am gelled in. 

Thursday, July 23, 2015

Loosing track of time

There was a time when we used to see dates on calendar and remembered what was the special occasion of the day. Today we see the date in our phone , laptop , desktop, tablet everyday every moment.. Yet we don't remember the special dates unless we get n update of Facebook or a whatsapp update.. Loosing track of the important has not been new but used to happened when we hit 80s.. But now we have become so prone to technology we hardly let our brain think on the things which should be more important to us.. We r trying to compete everyday with the everyone trying to like more post more and update more trying to get cooler than others.. Recent dent being every second selfie.. So what's dere to detox from this?? Food fr thgt..

Tushar