Saturday, May 13, 2006

Linux quick notes



chmod

to change access mode of a file (file permissions)


u = the user who owns the file

g = the group the file belongs to

o = others

a = all of the above (ab abbreviation for ugo)


example: to prevent outsiders from executing archive.sh before : -rwxr-xr-x archive.sh

command: chmod o=r archive.sh

after : -rwxr-xr-- archive.sh


example : to take away all permissions for the group for topsecret.inf, leave the permissions part of the command empty.

Before : -rw-r----- topsecret.inf

command : chmod g= topsecret.inf

after : -rw------- topsecret.inf


example:

chmod go=rx wordmatic.txt

chmod go-w wordmatic.txt

chmod a+wx calcmatic.bak


To kill non responding application:

ctrl-alt-Esc


move or rename files:

mv


whatis

information on a topic


makewhatis

creates an updated whatis database

umask

the default permission given to new files created


suid and sgid

special permissions given to program so when it runs by a user, it inherits the rights of the owner of the pprogram, not the user running it.

eg. /etc/passwd


setting & removing suid & sgid

for eg.:

# chmod u+s /usr/bin/myapp

# chmod g-s /home/drobbins


Directory permissions:

Directory permissions are a bit different that file permissions.

For a directory, if the “read” (r)flag is set, you may list the contents of the directory.

“write” (w) means you may create files in the directory; and “execute” (x) means you may enter the directory and access any sub-directory inside.

Without the “execute” (x) flag, the filesystem objects inside the directory aren't accessible.

Without the “read” ( r ) flag, the filesystem objects inside the directory aren't viewable but can still be accessible as long as someone knows the full path to the object.


If a directory has the “sgid” flan enabled, any filesystem objects created inside it will inherit the group of the directory. This particular feature come in handy when you need to create a directory tree to be used by a group of people that all belong to the same group.


simply do this:

# mkdir /home/groupspace

# chgrp mygroup /home/groupspace

#chmod g+s /home/groupspace


now any users in the group mygroup can creat files or directories inside /home/groupspace, and they will be automatically assigned a group ownership if mygroup as well. Depending on the users' umask settings, new filesystem objects may or may not be readable, writable, or executable by other members of th mygroup group.


after installing Windows server 2003 on an available partition, the previous grub was destroyed from from MBR by Windows.

solution:

restart from rescue cd

reinstall grub: /sbin/grub-install /dev/hda


symbolic link:

ln -s [target] [link_name]


rsync

eg.:

rsync -av –delete /home/user/ username@server:/backup/home/user


If a directory is being backed up, remember to use / at the end of the directory name.

rsync uses ssh



Users & Groups


newgrp


useradd


groupadd


usermod


userdel -r (-r to remove user home directory too)


groupdel



ACL

acl shou be in the /etc/fstab

# getfacl

# setfacl


VNC

start vnc server:

vncserver


change password:

vncpasswd


connect to server from client by specifying the ip address/hostname and desktop

eg.:

192.168.123.10:1


configuration file:

.vnc/xstartup


default window manager is TWM, you can change it

eg.:

startkde or startgnome


to kill vnc:

vncserver -kill :1


default vnc viewer port: 5901

Java based viewer: 5801


Saturday, April 29, 2006

The Downside of Certification

The worst things that ever happened to IT were Microsoft and certifications.

Off course we all know about the damage Microsoft is doing to the industry. But there is something else they or others had done that let an uneducated workforce into the industry.

Certifications are not a replacement for good education and if anything, MCSE is an indication of incompetence. I never met one how is pasionate or eager about the industry and most of them are clueless about other operating systems.

On the other hand, Linux skills are an indication of talent, motivation to develop your career and quick learners.

What are those worthless certifications good for?

Read more at www.eweek.com/article2/...

Sunday, January 22, 2006

LXer: Linux not standing in wait as Microsoft sinks its own ship

Many have predicted the fall of Microsoft. I strongly beleive that this is ultimately the faith of corrupt and nonsensical companies.

IT is now starting to evolve from a Windows monoculture to a dynamic and exciting beast (Heterogenious networks, interactive Web2.0, lots of programming languages, etc.)

It seams that the sooner Microsoft crumbles, the sooner the IT is revived and flurishes.

Read more at lxer.com/module/newswir...

Friday, December 30, 2005

Corruption

No words can describe the evil of Microsoft. But we can start with the corruption: from corporate to Government corruption.

We watched Massachusetts progress towards open standards and independence from Microsoft's monopoly. The IT industry supported their decision with the exception of Microsoft off course. And mysteriously, Senator Marc Pacheco intervened in an IT process! Well, there's no mystery, is there?
When Microsoft has influences in Government and politics, we shouldn't wonder why they're still a monopoly.

Read more at lxer.com/module/newswir...

We read a lot of News, in particular IT. And we can't help but notice that not only Microsoft manipulates politicians in Government but they also infiltrated the media.

Read more at lxer.com/module/newswir...

Saturday, December 17, 2005

IT Certification

Steven J. Vaughan-Nichols of eWeek posted an article titled "Certification Helps with Path to Linux Jobs". While I usually agree with him, I'm afraid certification is a horrible way to assess professionals. Just look at the disasters the MCSE certification created. This certification only produced paper MCSEs and what's even worse is that they are platform dependent. And now the market is flooded with incompetent employees. Another problem I see is that if a particular certification becomes an industry standard, everyone will only work hard enough to achieve it and once they get it, they won't bother to learn anything more and will result in the classic lazy and clueless paper professionals.

Read more at www.eweek.com/article2/...

Thursday, December 15, 2005

Web 2.0

Lately, there is a lot of buzz around two words: Web 2.0 and AJAX. Well, there is good reason for all the bees swarming around this honey.

This Web 2.0 is really a combination of common technologies and AJAX stands for Asynchronous JavaScript and XML. So, the real deal is not the indevidual technologies but rather the effect of them combined to create Web Applications.

In my opinion, Web 2.0 is the real Microsoft kill because it make the operating system irrelivant. It work on any platform: Linux, Windows, Mac OS X, etc. Moreover, you don't even need a powerfull PC, all that is required is a web browser.

This is a really exciting time in technology. As a matter of fact, I beleive this is a revolution that turns the industry upside down. I'd like to also mention there's Ruby on Rails (RoR) yet another web application

Read more at web2.wsj2.com/the_best_...

Linux.com: The Enterprise Linux Resource

Great website for SysAdmins

Read more at www.linux.com/