Linux - Admin friendly

From Blue-IT.org Wiki

Revision as of 02:13, 5 October 2008 by Apos (talk | contribs) (System)

System

Change UID and GID

In some rare cases - e.g. when changing a disk with home directories between distributions - it might be necessary to change recursively the GID and UID's for the new system:

usermod -u <NEWUID> <LOGIN>
groupmod -g <NEWGID> <GROUP>
find / -user <OLDUID> -exec chown <NEWUID> {} \;
find / -group <OLDGID> -exec chgrp <NEWGID> {} \;

Change directory and file permissions

When you like to change certain directories recursively - e.g. when these are defect or for security issues, you can use the find command.

You can use this command for different issues - not only for changing the write permissions:

Search and change changing all directories with name public_html:

find . -type d -name public_html -exec chmod 0755 {} \;

Repair all permission settings recursively is a two step process. First recursively make everything read, write and executable. Then in a second step just alter the files:

chmod -R 775 yourDirectory
find yourDirectory/. -type f  -exec chmod 0664 {} \;

CUPS

SuSE 10.1

To enable browsing via the network you have to setup a password for user root: See on you local [file:///usr/share/doc/manual/suselinux-manual_en/manual/sec.p.special.html SuSE Documentation]:

lppasswd -g sys -a CUPS-admin-name

Now you should configure your cups server via yast allowing some network clients to admin the printers.

LVM

Ubuntu Feisty

Found in Ubuntu Forums.

Search for the latest fedora system-config-lvm, e.g. via rpmfind.net and download it

 wget ftp://rpmfind.net/linux/fedora/releases/7/Everything/i386/os/Fedora/system-config-lvm-1.1.1-1.0.fc7.noarch.rpm

Install alien:

apt-get install alien

And convert the rpm into a debian package and install it.

alien -d system-config-lvm-1.1.1-1.0.fc7.noarch.rpm
dpkg -i system-config-lvm_1.1.1-2_all.deb

Ubuntu works with python2.5, so make a symlink as follows

 ln -s /usr/bin/python2.5  /usr/bin/python2

Either start directly from a terminal or create a starter in menu->administration with

gksudo system-config-lvm

Be aware that all changes to lvm will take effekt emediately - so be careful what you do!