when the shit goes down …

January 13, 2009

w00t them all or how to extract system/unix/linux uid from /etc/passwd with sed

Filed under: *nix like stuff — valntine @ 7:58 pm

If you are wondering how to change/extract the linux system user id of all users in your /etc/passwd file with sed (Stream EDitor) and you do not want to use awk or smth like that because you just need to use sed and nothing else here you go …

sed “s/x:[0-9]\{5\}:/x:myw00tIDhere:/g” /etc/passwd

Изглежда хакерско нали. Мамка му и прасе на тоя сед, 40 минути ми отне докато го композирам.

We all hate regex but no-one wants to say that.

Аз понеже си нямам модул за тагове и други глезотии ще го тагна по своему.

Tags:

extract uid /etc/passwd sed
sed extract user id /etc/passwd
get uid /etc/passwd sed
sed uid /etc/passwd
sed userid /etc/passwd
sed extract user id password