tag:blogger.com,1999:blog-69550422009-06-19T04:27:11.564-07:00UnixAdminsDiaryInformations about Unix problems and their solutions, as they occur during my daily work.
If you have better solutions or comments to the problems listed in this blog, you are welcome to comment it.Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-6955042.post-25329875769109003032009-06-19T04:23:00.000-07:002009-06-19T04:27:11.574-07:00strace pendant for AIXAIX provides an strace commando, but this has nothing to do with the strace someone may know from linux systems. But AIX also provides an commando that has similar functionality: truss<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-2532987576910900303?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-89723700172366193272007-10-16T23:43:00.000-07:002007-10-16T23:47:47.294-07:00How to get a console during hp-ux startupSometimes a problem appears during the startup of hp-ux (eg network problems) and the startup process hangs (eg when trying to connect to NIS server or something else). A fix like temporary deactivation of NIS could be done easily - but how to get a login to do this?<br /><br />Just press Crtl-Shift-\ (on US-keyboard, so this is: Crtl-|) and a login prompt will appear!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-8972370017236619327?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-20240483541637524042007-09-24T00:28:00.000-07:002007-09-24T00:39:58.760-07:00ssh_exchange_identification: Connection closed by remote hostThis sometimes happens on my long-running RHEL4 server that has lot of ssh traffic. It happens unexpectedly, and no log entries are produced.<br />As mentioned in <a href="http://www.raditha.com/blog/archives/000604.html">The Site With the Lamp</a>, this seems to be a problem with too much (old?) ssh connections. <br /><br />But the solution recommended there (waiting) is usually not meeting my needs, I need an immediate solution. <br />/etc/init.d/sshd restart does not work, but a simple <br />killall -9 sshd<br />followed by a<br />/etc/init.d/sshd start<br />saves the day!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-2024048354163752404?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1149495304756403752006-06-05T01:10:00.000-07:002006-06-05T01:15:04.760-07:00Arg list too long on IRIX systemsA common problem: you are running a script or program on your IRIX machine, that automatically generates the command line call for another script or program - but the call fails with the following error message:<br /><br /><span style="font-weight:bold;">bad interpreter: Arg list too long</span><br /><br />Ok, the cause is clear - the generated call exceeds the system's max args limit. Luckily, this can be fixed very easily on IRIX systems - as also explained at <a href="http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?cmd=getdoc&coll=0650&db=man&fname=2%20intro">SGI Techpubs library</a>.<br /><br />First, lets have a look whats the actual limit. This can be examined using sysconf:<br /><br />shell> <span style="font-weight:bold;">sysconf | grep ARG_MAX</span><br />ARG_MAX <span style="font-weight:bold;">20480</span><br />...<br /><br /><br />Well, the actual (IRIX default) limit is about 20k for the max command line lenght, which is definitly not very much. Now we check whats the allowed maximum for the actual kernel. We open /var/sysgen/mtune/kernel with any ascii viewer and search for the definition of ncargs or we just use grep like this:<br /><br /><span style="font-weight:bold;">grep ncargs /var/sysgen/mtune/kernel</span><br />* ncargs is max # bytes of arguments passed during an exec(2)<br />ncargs 20480 5120 262144<br /><br />There we can see that the legal range for ncargs is from 5120 to <span style="font-weight:bold;">262144</span>, which seems to be the right value for us. IRIXs systune cat set this value during runtime:<br /><br /><span style="font-weight:bold;">systune -b ncargs 262144</span><br /><br />After this (without logout, reboot or something else), the new value is active:<br /><br />shell> <span style="font-weight:bold;">sysconf | grep ARG_MAX</span><br />ARG_MAX 262144<br />...<br /><br />Now our script should have plenty argument space to operate ...<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-114949530475640375?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1146636969710007452006-05-02T23:09:00.000-07:002006-05-02T23:16:09.720-07:00Some X Clients work with ssh X forwarding, some notIt seems like a really strange issue: you connected to a unix machine (running opensshd) with ssh -X, you can run X clients like xterm there, but some applications fail to start with the following error message:<br /><span style="font-style:italic;"><br />X11 connection rejected because of wrong authentication.<br />Unable to continue communications with the X display.<br />Please ensure that the X Server is still running, and the<br />connection to it is still valid.</span><br />But the solution is very simple: the client tries to connect localhost instead of the machine, for which the auth may not be set. OpenSSH has an server option to configure this behavoir. In sshd_config, change the (usually commented) line<br /><span style="font-style:italic;">#X11UseLocalhost yes</span><br />to<br /><span style="font-style:italic;">X11UseLocalhost no</span><br />and restart the sshd. Now this problem should not appear anymore.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-114663696971000745?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1118222335342341862005-06-08T02:13:00.000-07:002005-06-08T02:27:47.846-07:00What the hell are the Solaris slicesWhen I tried to get a dd-mirror of a complete disk running under Solaris, I had the problem how to find out how to do this with these strange solaris slices (that also always confuse me when I set up a Solaris machine). But the online Solaris documentation (<a href="http://docs.sun.com">docs.sun.com</a>, very good, always worth the look) had the right answer: <br /><span style="font-style:italic;">slice 2:<br />refers to the entire disk, by convention. This slice is defined<br />automatically by the format utility and the Solaris installation<br />programs. The size of this slice should not be changed.</span><br />The meaning of all slices can also be found in the <a href="http://docs.sun.com/db/doc/806-4073/6jd67r9ft?a=view">SUN online documentation</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-111822233534234186?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com1tag:blogger.com,1999:blog-6955042.post-1118221781455256962005-06-08T02:05:00.000-07:002005-06-08T02:09:41.460-07:00IBM AIX: cannot log in because its not the lowest login shellSometimes, common problems lead to very strange error messages.<br />Last time I got the following message when I tried to login via telnet to an IBM IntelliStation running AIX 5.1: <span style="font-style:italic;">You must "exec" login from the lowest login shell.</span>, and the login process failed.<br /><br />The reason for this error is trivial: the root filesystem (/) was 100% full, so the solution was just to delete some unneded files (some old cores, in my case) and everything was fine.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-111822178145525696?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1118221485125498352005-06-08T01:58:00.000-07:002005-06-08T02:04:45.130-07:00NIS on SGI/IRIXIRIX (AFAIK) has no direct support (I mean a GUI tool) to manage the use of NIS for passwd and groups - you can just turn NIS client on and configure the host resolution order.<br />So take care that nsswitch.conf is set up correctly (usually, it is!) and the /etc/passwd and /etc/group contains +::::: (or +:::) in the last line (or something similar ;-))<br />Otherwise you will have the problem that ypcat passwd delivers the expected useres, but non of these users can log in (<span style="font-style:italic;">Unknown user id</span>).<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-111822148512549835?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1118220876461453092005-06-08T01:41:00.000-07:002005-06-08T01:57:06.776-07:00Some pitfalls when setting up a SGI/MIPS machineWhen I set up a SGI/Irix Octane 2 (with 2 MIPS R12k CPUs) the last time, I ran into two pitfalls I want to mention here:<br /><br />1) On newer machines (which does not use the old-fashioned R10k-CPUs anymore, I assume) you cannot install any IRIX 6.5 version you want. On my machine, it had to be at least 6.5.10, otherwise the starting of the miniroot (Installation Tools) failed (machine hang up completely)<br />Although IRIX releasenote contains some information about some hardware support, I found nothing about R12k or Octane2 there :-(<br /><br />2) NFS installation failed with following error:<br /><span style="font-style:italic;">ERROR: this software distribution is not meant to install on the version of IRIX currently running on this machine. Sorry</span><br />This happend for me when I tried to install form the ONC/NFS CD that comes with IRIX 6.5. The reason of this problem is that this CD is also suited for the use of IRIX 6.2, 6.3 and 6.4, not only 6.5, which means that the distribution is not located in /CDROM/dist (as usual), but in /CDROM/dist6.5<br />Changing the path in the instalaltion tools to the right distribution directory solves the problem!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-111822087646145309?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1118219999958913092005-06-08T01:31:00.000-07:002005-06-08T01:39:59.963-07:00SGI Irix: how to start System Manager without desktop?Every SGI user knows the System Manager - usually to be reached from the Desktop menu. But if you just shot the desktop - as i did the last time - where the hell is the System manager located?<br />The easy-to-find-out (if everyting is running as it should:-) answer: /usr/sysadm/bin/sysmgr<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-111821999995891309?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1100276522373862042004-11-12T07:49:00.000-08:002004-11-12T08:22:02.373-08:00Remote X login on Suse LinuxRegarding to the former post, you will not really be able to do this with a Suse Linux System. As SuSE has a little confusing XDM/GDM/KDM configuration strategy (eg, an actual KDM configuration is spread over KDM config AND over XDM config), it is recommended not to change this by hand. Instead, use SuSEs sysconfig to do this. Sysconfig is included in YaST2:
<br />
<br />Yast Control Center
<br /> -> Sysconfig-Editor
<br /> --> Desktop
<br /> ---> Display-Manager
<br /> ----> DISPLAYMANAGER_REMOTE_ACCESS=yes
<br /> ----> if needed: DISPLAYMANAGER_ROOT_LOGIN_REMOTE=yes
<br />
<br />This should enable full remote X access to a SuSE box.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-110027652237386204?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1090444007666049712004-07-21T14:00:00.000-07:002004-07-21T14:14:48.316-07:00Linux: execution of a program fails with permission denied, but the file has r_xr_xr_x modeYou have an executeable; all modes are ok (eg r_xr_xr_x), but if you try to run the program, you get an "permission denied"-error.
<br />AFAIK there are two possible reasons for this:
<br />First, you try to start an old libc5-executeable on an libc6-machine without compat-libs.
<br />Solution: install the libc5-compat-libs that comes with your distribution and hope that they work.
<br />Second, maybe you try to start the executeable from a mount point that has not set the <i>exec</i>-Flag (the location of the executeable, NOT the current working directory). Take a look at /etc/fstab, if you see a line like
<br /><i>/dev/scd0 /cdrom iso9660 ro,user,noauto 0 0</i>,
<br />than you can see that the exec flag is not set.
<br />Solution: change the line to
<br /><i>/dev/scd0 /cdrom iso9660 ro,user,noauto,exec 0 0</i>,
<br />then the "permission denied"-error will disappear.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-109044400766604971?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1085669047299161262004-05-27T07:35:00.000-07:002004-05-27T07:44:07.300-07:00AIX: ftp login fails if user uses a non-standard shellSomeday, you may have the following problem: your machine works fine, everything is ok, the users are happy - but somedays, one user trys to connect to the machine via ftp, and he gets the following error:
<br /><em>ftp: Login failed.</em>
<br />Well, if you have an out-of-the-box AIX configuration and you try to connect to ftp as root, it works fine.
<br />Assuming that you are an experienced unix admin, you look at the users login shell settings - and there you may find a non-standard login-shell, so you put this into /etc/shells, as known from other unix systems.
<br />This is nothing very exciting until now, but - surprise: the logon still fails!
<br />
<br />But you can be happy, because the solution is very simple: look into /etc/security, there you will find a file named <em>login.cfg</em>, which contains a line beginning with <em>shells =</em> , followed by all standard systems shells. Put the shell used by the user into this line, and ftp will work.
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-108566904729916126?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1084870569312852052004-05-18T01:42:00.000-07:002004-05-18T01:56:09.313-07:00AIX 4.3: ypcat problems after connection to NIS server lostAssume that your AIX machine gets passwd via NIS from a NIS server. Assume that the server crashes, that it stays offline a longer time (eg some hours) and, after the server is up again, ypcat passwd on the NIS machine doesnt show the NIS users.
<br />No problem at all, you might think - simple restart the ypbind daemon and everything will be fine.
<br />But - after restarting, you still dont get the desired user list when performing a ypcat passwd.
<br />Ok, if you are a MS Windows approved admin, you will now reboot the AIX machine, but after rebooting, ypcat passwd still doesnt show the NIS users.
<br />
<br />AFAIK this is caused because the AIX ypbind doesnt always ask the NIS server. Look at /var/yp/binding - you will find files like <em>your_nis_domain.1</em> and <em>your_nis_domain.2</em> there.
<br />Just try the following: stop the ypbind, delete these files, and then, restart ypbind.
<br />Usually, a ypcat passwd should show you the expected user list.
<br />But in most cases, you dont have to do this. It seems theses files are fetchted automatically if they are too old. This means that if you wait long enough, the files become updated and ypcat passwd works right without manual deletion of these files. <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-108487056931285205?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1084478849677405432004-05-13T12:46:00.000-07:002004-05-13T13:07:29.676-07:00Debian: can not open a X window from a remote machine on my displayWell, this is not only a Debian problem - it can appear on ever Linux (and also on Unix) platform, and it is a feature, not a bug ;-)
<br />But I mention this with Debian, because Debian is the only system I know which has this security feature by default.
<br />The situation is the following: you are sitting in front of your Debian box, running the local Xsession, managed by xdm/gdm/kdm (lets assume that we use kdm, but the others behave identically). You want to login to another Unix machine and want to run remote a X application (eg a xterm).
<br />No problem, you just type on the debian box
<br /><em>xhost +</em> and eg
<br /><em>telnet remote_machine</em> (yes I know that it is better to use ssh instead of telnet ;-)
<br />
<br />and after the login you type (on the remote machine)
<br /><em>export DISPLAY=debian_box:0.0</em>
<br /><em>xterm</em>
<br />
<br />and - surprise, surprise - this fails ( ... can't open display .. and so on)
<br />
<br />The solution is very easy:
<br />all remote X access is controlled by xdm/gdm/kdm, and Debian configs them in a way that every remote X connection is denied. Eg in /etc/kde2/kdm/Xservers you will find a line looking like this:
<br /><em>:0 local@tty1 /usr/X11R6/bin/X -dpi 100 -nolisten tcp vt7</em>
<br />The <em>-nolisten tcp</em> denies the remote connection, so just remove it:
<br /><em>:0 local@tty1 /usr/X11R6/bin/X -dpi 100 vt7</em>
<br />
<br />After restaring the display manager, the remote X connects will work fine.
<br />
<br />
<br />
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-108447884967740543?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1084341597671937532004-05-11T22:50:00.000-07:002004-05-11T22:59:57.670-07:00HP-UX: console (ie telnet) login works, but CDE login failsThis very strange behaviour appeared after setting up a HP-UX 11 machine as NIS client. Only passwd and group are shared by NIS. After doing the appropriate setup with SAM, ypcat passwd and ypcat group worked fine and remote telnet logins to the machine were successful. But remote and locale CDE logins faild with the "usual" CDE communications error.
<br />The solutions is strange, but simple:
<br />Set the Name Service Switch entries "netgroup" and "networks" to NIS as first service and put the files /etc/netgroup and /etc/networks as the second service. Although wether netgroups nor networks are shared by the NIS server, all of our HP-UX 11.00 and HP-UX 11.22 clients worked fine with this setting.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-108434159767193753?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0tag:blogger.com,1999:blog-6955042.post-1084307087264054722004-05-11T13:19:00.000-07:002004-05-11T13:24:47.263-07:00First EntryWell, this starts up my <em>Unix Admin's Diary</em>!
<br />From this day on, I will post the cognitions I get at my daily work with Linux, AIX, HP-UX, IRIX and Solaris boxes (and sometimes with Wintendos, too ;-).
<br />I hope that the information collected here will help other people around the world fixing some Unix troubles a little bit faster ...<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6955042-108430708726405472?l=unixadminsdiary.blogspot.com'/></div>Blue.Balloonhttp://www.blogger.com/profile/13243598108616566239noreply@blogger.com0