
LINUX Jots
Pathing tennis executables to a new user
Assume username is blahblah. Home will be /home/blahblah.
1) Log on as root, and create /home/blahblah/kylix/bin
2) copy script "kylixpath" into /home/blahblah/kylix/bin
3) add the following line to .bashrc in /home/blahblah:
source /home/blahblah/kylix/bin/kylixpath >/dev/null
4) copy executables (such as muc) into /home/blahblah
5) log out, and log on as blahblah. Create a script for each executable. For example, for the program "muc", create "mucscript".
Lines of mucscript
source /home/blahblah/kylix/bin/kylixpath >/dev/null
cd /home/blahblah
./muc
6) Make each script executable:
chmod +x mucscript
7)Execute the programs via the scripts. You can create a desktop icon as follows:
a) right-click on desktop
b) new
c) application
d)name the new application "execute mucscript.kdelink"
e) Permissions - make sure execute is enabled
f) Under EXECUTE, put in /home/blahblah/mucscript
VRFlash is in /home/skunk/agenda/vrflash
/sbin/service/xinetd restart
Mounting CDROM
(1) su to root (2) mount -t iso9660 /dev/hdc /mnt/cdrom
PMON PROMPT
/usr/doc/minicom
/usr/bin/minicom
minicom -s (setup) to keep from freezing a recalcitrant serial port
/dev/ttyS0 (serial port - COM1)
Memory recognition bug - in LILO.CONF
to recognize all memory.......... append = "mem=191M"
Install - VGA = 785 NEC Multisynch 1510V
ifconfig
chmod +x <scriptname>
kernel version : uname -a
SAMBA
etc/sysconfig/network-scripts
/etc/samba/smb.config
/etc/samba/smbpasswd
/etc/samba/smbusers
/etc/samba smbpasswd -a <username>
autoexec: settings | Gnome Control Center | Session | Startup Programs
RESTARTING SAMBA /etc/rc.d/init.d/smb restart - under Caldera this is /etc/rc.d/init.d/samba restart
mount -t smbfs //Matroxhp/Matrox_HP_D /mnt/test -o username=myNTusername%mypassword,dmask=777,fmask=777
/home/skunk pdksh skunksamba
SECURITY
chmod 644 <filename>
chmod u+s <files> - files adopt security of user making command (set suid)
chmod g+s <files> - files adopt security of group of user making command (set sgid)
RPMs
rpm -ivh whatever.rpm
MISC: Top 30 Most Useful Commands
alias - make alternative names for commands, i.e. alias dir=ls
cat - same as "type" in DOS
cp - copy
df - diskfree
du - another verbose ls
env - view environment variables
find - syntax find . -name *.pl
free - amount of memory free on the system
hostname - displays current hostname
ifconfig - view IP address & mappings
locate - search entire volume for a match, i.e. locate spe*
look - similar to grep
mkdir - makes a directory
passwd
pwd - print working directory
rm - same as del in DOS
su - superuser
tail <filename> - prints out last 10 lines of file
vdir - verbose directory
w - who is logged on
export - check the current PATH
To add /usr/sbin to current path....... export PATH=$PATH:/usr/sbin
Sourcing Kylix-produced programs - edit /home/<username>/.bashrc and add the following line:
source /home/<username>/kylix/bin/kylixpath >/dev/null
Setting up Samba under CALDERA eDESKTOP 2.4
1. Update GLIBC with Borland's Mandrake patches if Kylix won't install. Use Package manager (SYSTEM | KPackage).
2. In /etc/samba.d there is an example samba config file. Copy it to smb.conf and edit it to your specs (password encryption, etc)
3. To see if samba is working, try /etc/rc.d/init.d/samba start (or restart).
4. Install the daemon - Settings | COAS | System | Daemons
5. On the Windows box, set up a user & password
6. Set up the autoexec for the Kylix user. If the user is skunk, then in /home/skunk, create the script (skunksambascript) with the following:
mount -t smbfs //Broder_a21/A21_D <space> /mnt/test <space> -o username=windowsusername%windowspassword,dmask=777,fmask=777
Make it executable:
chmod -x skunksambascript
7. Copy a link to this scriptinto the Autostart folder so that it is executed every time the user logs on.
8. As root, change the permissions on mount and smbmnt
chmod 777 /bin/mount
chmod u+s /bin/mount AND ALSO chmod u+s /bin/umount
chmod u+s /usr/bin/smbmnt
8. Source the Kylix path. In /home/skunk/.bashrc add this line:
source /home/skunk/kylix/bin/kylixpath >/dev/null
9. If server croaks and Samba share goes unresolved, do this:
a) Stop Samba - as root, do /etc/rc.d/init.d/samba stop
b)Unmount the share - as user who mounted the share, umount -t-smbfs /home/skunk/A21D
c) Start Samba again - /etc/rc.d/init.d/samba restart
RedHat-specific stuff
In RedHat, to allow Samba mounts, you must do, as root:
chmod u+s /usr/bin/smbmount
chmod u+s /usr/bin/smbmnt
chmod 777 /bin/mount
set SMB options with /usr/bin/smbclient
restarting SAMBA: /etc/rc.d/init.d/smb restart
/etc/samba/smb.conf
smbpassword -a -U {add user} <name> -n {no password} NOTE! NO PASSWORD doesn't seem to work.
To automount SAMBA shares at boot..........
edit /etc/fstab, and put something like this in the file
//Hopelessadmin/hopelessC <spaces> /home/skunk/hopelessadmin <spaces> smbfs <> username=linuxbox%11111111,dmask=777,fmask=777
Then you can use SYSTEM | DISK MANAGEMENT from the menu to check the share
To add stuff to Autoexec, right-click on desktop and create a "link to application". Then copy the link into AutoStart.
Run ldd over the executable to see what libraries it will need, put them someplace, make sure that /etc/ld.so.conf has that directory in its database path, then run ldconfig to update any changes made in /etc/ld.so.conf.
run Xconfigurator to change video stuff
"less" command
/var/log/samba
Installing FastReport
COMPONENT - INSTALL COMPONENT;package file name = FRX.dpk;Unit file name=FR_REG.PAS
Registers FastReport and FR Tools
TAR
tar xzvf <filename>
NFS
Put your mounts in /etc/fstab if you want them mounted by startup daemons and/or accessible by SYSTEM | DISK MANAGEMENT. Parameter users enabled any user to mount or umount.
Mount command is something like this: mount -t nfs 192.168.1.250:/export <sp> /mnt/skunkserverfolder.
list exported volumes in /etc/exports, and then use command..........................exportfs -avr to make the nfs daemons re-read it.
restart NFS daemon ................./etc/init.d/nfs restart (or stop ... and then restart). The file /etc/exports MUST have something in it for NFS daemons to run.
Delaying mount - in /etc/rc5.d (scripts for runlevel 5) change S25netfs to S96netfs (or whatever) to put it way down in the startup list
showmount -e localhost or showmount -e 192.168.1.250 (server IP address) will display and verify available exports
cat /var/log/messages to check system status messages
Edit /etc/hosts.allow and /etc/hosts.deny to determine who has access to which daemons. You can use ALL : ALL or ALL : 192. or rpc.mountd : 192.168
CHECK FIREWALL! SYSTEM | FIREWALL-CONFIG or edit the file /etc/sysconfig/ipchains. Then to restart the firewall with updated rules, service ipchains restart
chmod 777 /dev/ttyS0