Posts

Showing posts from August 15, 2018

Shell script example to stop execution of all processes with a certain UID? [duplicate]

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite This question already has an answer here: How do I kill all a user's processes using their UID 5 answers I'm new to scripting and I can't seem to find any examples on the internet for this particular task. I'd much appreciate a bit of help. shell scripting uid share | improve this question asked May 27 at 8:01 Amelie 1 marked as duplicate by Romeo Ninov, ilkkachu, G-Man, Jeff Schaller, sourcejedi May 27 at 19:04 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. Try for i in $(pgrep -U $UID); do kill -9 $i; done or pkill -U $UID whichever seems suitable, replace $UID with the required UID or just assign it a value beforehand. – Kunal Gupta May 27 at 8:06 All solutions will require CAP_KILL (permission to kill any process), or to be root (

Ubuntu won't login after disk migration

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I have a weird problem here. I migrated my GF's drive from HDD to SSD. I had to shrink Windows partition and move partitions around to fit 750GB HDD to 512GB SSD. I think I did everything fine. Windows and Ubuntu both boot to the login screens. Only Ubuntu doesn't let her log in (both with screen keyboard and normal keyboard). Obviously, I though this is lightdm issue. I tried to login via shell CTRL + SHIFT + F1 . That doesn't work either. I have live USB, which I can boot from to mount linux partition. I didn't see anything unusual in the kern.log or syslog. So then I tried to start recovery mode but that ends up showing usual login screen instead of the recovery menu. I am really puzzled here. If it would be a partition issue, it wouldn't have booted at all. Her home directory is in the same partition as the system. Whole Linux system is in same partition + there is swap partition. I don&#