By William von Hagen, Brian K. Jones
Book Price: $29.95 USD
£20.99 GBP
PDF Price: $23.99
Cover | Table of Contents | Colophon
x, your system is using the /etc/shadow file to hold password information. If you see other characters between the first and second colons, your system is still storing its password information in the /etc/passwd file.usermod -L
user command, which inserts an exclamation mark (!) at the beginning of a user's password entry to lock out that user. Actually, if your system provides the passwd line. If you're using NIS, it might look something like this:passwd files nis
+@admins +jonesy
# touch /etc/nologin
ldd command on the binary for the service. For example, to make sure my SSH service is linked against libwrap, I've done the following:
# ldd /usr/sbin/sshd
linux-gate.so.1 => (0x004ab000)
libwrap.so.0 => /usr/lib/libwrap.so.0 (0x0072f000)
…(lots deleted)
http://www.openldap.org
), where most Linux LDAP development now takes place, is the source of the software discussed in this hack.http://www.openldap.org/software/download. If your Linux systems use a package management system, you'll need to install:ftp://ftp.kernel.org/pub/linux/utils/net/NIS:#!/usr/bin/perl use Net::LDAP; ## CONFIG my $server = "ldap-server"; my $base = "dc=example,dc=com"; my $bind = "uid=ldap2nis,ou=People,dc=example,dc=com"; my $bindpw = 'password'; my $groupf = "group"; my $passwf = "passwd"; my $buildyp = "false"; ## CONNECT my $ldap = Net::LDAP->new($server, onerror => 'die' ); $ldaps = $ldap->start_tls(verify=>'none') or die "Couldn't start tls: $@\n"; $ldap->bind( dn => $bind, password => $bindpw) or die "Bind failed: $@\n"; ## PRINT PASSWORD FILE my $res = $ldap->search( base => $base, scope => 'sub', # entire tree timelimit => 600, filter => '(&(objectClass=posixAccount))', attrs => ['uid', 'uidNumber', 'gidNumber', 'gecos', 'homeDirectory', 'loginShell', 'userPassword'], ); open(PASSWORD, ">$passwf"); while (my $entry = $res->shift_entry) { (my $uid = $entry->get_value('uid')) =~ s/:/./g; (my $uidnum = $entry->get_value('uidNumber')) =~ s/:/./g; (my $gidnum = $entry->get_value('gidNumber')) =~ s/:/./g; (my $gecos = $entry->get_value('gecos')) =~ s/:/./g; (my $homedir = $entry->get_value('homeDirectory')) =~ s/:/./g; (my $shell = $entry->get_value('loginShell')) =~ s/:/./g; (my $up = $entry->get_value('userPassword')) =~ s/:/./g; if (index($up, "{crypt}") != -1) { $up = substr($up, 7); }else{ $up = crypt($up, "bR"); } $passrecord = join(':',$uid,$up,$uidnum,$gidnum,$gecos,$homedir,$shell); print PASSWORD "$passrecord\n"; } close(PASSWORD); chmod(0600, $passwf); ## PRINT GROUP FILE my $res = $ldap->search( base => $base, scope => 'sub', # entire tree timelimit => 600, filter => '(&(objectClass=posixGroup))', attrs => ['cn', 'gidNumber', 'memberuid'], ); open(GROUP, ">$groupf"); while (my $entry = $res->shift_entry) { (my $grname = $entry->get_value('cn')) =~ s/:/./g; my $grpass = "*"; (my $grnum = $entry->get_value('gidNumber')) =~ s/:/./g; (@members = $entry->get_value('memberuid')) =~ s/:/./g; if($#members >= 0) { $memusers = join(',',@members); }else{ $memusers = ""; } $grprecord = join(':', $grname,$grpass,$grnum,$memusers); print GROUP "$grprecord\n"; } close(GROUP); chmod(0600, $groupf);
DISPLAY environment variable to output programs to different displays, or you can take advantage of cooler, newer technologies such as VNC to display the entire desktop of a remote system in a window on the system on which you're currently working. This hack explains how to use VNC to do just that. VNC is a cross-platform thin client technology originally developed by Olivetti Research Labs in Cambridge, England, who were later acquired by AT&T. A VNC server runs on a desktop or server system and exports an X Window System desktop that can be accessed by a VNC client running on another system. VNC servers are typically password-protected and maintain their state across accesses from different clients. This makes VNC an optimal environment for accessing a graphical console and running graphical administrative and monitoring applications remotely.http://64bit.vonhagen.org:5801/.http://fluxbox.sourceforge.net).
http://www.realvnc.com and http://www.tightvnc.com–L (local) option and an appropriate argument when you execute the ssh command.$ ssh -L local-port:local-host:remote-port remote-host
http://www.ltsp.org) lets you boot desktop systems from a remote server, gives users access to their applications and data when they log in, and provides a graphical, X Window System working environment that is functionally identical to booting from a local disk. This can provide substantial cost savings by enabling you to deploy or reuse less-expensive hardware on your users' desktops, since it reduces the amount of local storage and other hardware that any desktop system requires. A processor that is too slow to keep up with the demands of today's applications can still function quite nicely when its sole function is to update a display and respond to mouse and keyboard input.http://www.nomachine.com). NoMachine has developed a compression technology that substantially reduces the size of X Window System communications and adds other performance improvements through caching and general protocol optimization. NoMachine provides several informative white papers about their technology and its performance at http://www.nomachine.com/documentation.php. If you're already a VNC fan, NX is definitely worth a look, for performance reasons as well as for the fact that it inherently uses SSH for secure communications between client and server.
5901 as the port number.
http://www.webmin.com. Install Webmin with the following command, where version-number is the version that you downloaded:# rpm –install Webmin-version-number.rpm
http://www.webmin.com and unpack it to your system as usual. Navigate into the newly created Webmin directory, and execute the following command as root:
# ./setup.sh /usr/local/Webmin