Chaidir’s Corner

Linux, Tips n TutorialJuly 7, 2006 8:44 am

FYI, this tips is for newbie like me who is still learn how to use FreeBSD or people who was forgot about managing they FreeBSD system :-D .

When u want to update user’s group after editing /etc/passwd or /etc/master.passwd, you don’t have to reboot your system.

For example, if you wanna change group for user chaidir into becoming wheel, edit /etc/passwd like this:

before

chaidir:*:1001:1001:chaidir:/home/chaidir:/bin/sh

after

chaidir:*:1001:0:chaidir:/home/chaidir:/bin/sh

Then after editing /etc/passwd, use this command :

pwd_mkdb /etc/master.passwd

or

pwd_mkdb /etc/passwd

pwd_mkdb is an utility to generate the password database. This utility can also be used for updating your password after changing user’s password (passwd).

I made here for forgetful person like me.. so, when i forget something, I will see this tutorial again. :-)

Linux, Tips n Tutorial 8:42 am

if you want to find a folder with all privilege permission (0777) in UNIX (Linux or FreeBSD) besides /temp folder, you can use this command :

$ find / -perm 0777 type -d

info :

-perm : permission

-d : Cause find to perform a depth-first traversal, i.e., directories are visited in post-order and all entries in a directory will be acted on before the directory itself. By default, find visits directories in pre-order, i.e., before their contents.

This is useful when you want to download file, program or exploit in your system without root privelege :-) .

But.. it is work if in there is a folder with 0777 permission in the system.

credit for kartubeben http://www.kartubeben.com