aix

Running UNIX commands as different user, from Java

烂漫一生 提交于 2019-11-28 08:27:47
Trying to write a Java program capable of running a UNIX command as a different UNIX user. I have the user's password, and I know the command I want to run, but the command has to be run as that user - so I have to login as that user first. For example: say we have a user, jim, who wants to see what's in bob's home directory, and (for whatever reason) jim has access to execute ls whereas bob does not. We are currently logged in as bob . Here is what we (could) do: bob@host$ su jim && ls ~bob Problem is, we get prompted for jim's password. Since this is run from a Java program, i.e. Process p =

How to do remote debugging with Eclipse CDT without gdbserver?

£可爱£侵袭症+ 提交于 2019-11-28 07:37:49
We're using the Eclipse CDT 5 C++ IDE on Windows to develop a C++ application on a remote AIX host. Eclipse CDT has the ability to perform remote debugging using gdbserver. Unfortunately, gdbserver is not supported on AIX. Is anyone familiar with a way to debug remotely using Eclipse CDT without gdbserver? Perhaps using an SSH shell connection to gdb? finally I got gdb run remotly anyhow now. At the Bug-symbol on the taskbar I took Debug Configurations - GDB Hardware Debugging. In Main C/C++ Applications I set the full path on the Samba share of the executable ( X:\abin\vlmi9506 ). I also set

How to runtime debug shared libraries?

假如想象 提交于 2019-11-28 03:55:53
Can anyone tell me how to do runtime debugging on shared libraries? I need to runtime-debug a function in my shared library, but its called by another program. How can I do something like dbx with shared libraries? I m using dbx on AIX. is gdb better than dbx for what I m trying to do?. lothar You just need to call gdb with the executable (it does not matter if it is yours or a 3rd party one). Here is an example where I debug the ls command and set a breakpoint in the (shared) c library . This example uses gdb 6.8 which supports deferred (pending) breakpoints which makes this easy: gdb /bin/ls

Sed on AIX does not recognize -i flag

心不动则不痛 提交于 2019-11-28 01:55:59
Does sed -i work on AIX? If not, how can I edit a file "in place" on AIX? The -i option is a GNU (non-standard) extension to the sed command. It was not part of the classic interface to sed . You can't edit in situ directly on AIX. You have to do the equivalent of: sed 's/this/that/' infile > tmp.$$ mv tmp.$$ infile You can only process one file at a time like this, whereas the -i option permits you to achieve the result for each of many files in its argument list. The -i option simply packages this sequence of events. It is undoubtedly useful, but it is not standard. If you script this, you

Unable to connect to AIX(Unix) box with SSH.NET Library - Error : Value cannot be null

ぃ、小莉子 提交于 2019-11-27 22:20:25
问题 I am trying to connect to an AIX box and execute some commands using SSH.NET library. The following is the code snipplet KeyboardInteractiveAuthenticationMethod kauth = new KeyboardInteractiveAuthenticationMethod(username); PasswordAuthenticationMethod pauth = new PasswordAuthenticationMethod(username, password); ConnectionInfo connectionInfo = new(ConnectionInfo(servername, 22, username, pauth,kauth); SshClient sshClient = new SshClient(connectionInfo); sshClient.Connect(); SshCommand

IBM产品系列和AIX系统版本

梦想与她 提交于 2019-11-27 20:47:06
AIX系统版本 AIX 7.2 No supported AIX levels. AIX 7.1 Technology Level Base Level Recommended Level Latest Level 7100-00 7100-00-00 7100-00-10 7100-00-10 7100-01 7100-01-00 7100-01-10 7100-01-10 7100-02 7100-02-00 7100-02-07 7100-02-07 7100-03 7100-03-00 7100-03-09 7100-03-09 7100-04 7100-04-00 7100-04-07 7100-04-07 7100-05 7100-05-00 7100-05-03-1846 7100-05-04 AIX 6.1 Technology Level Base Level Recommended Level Latest Level 6100-00 6100-00-00 6100-00-11 6100-00-11 6100-01 6100-01-00 6100-01-09 6100-01-09 6100-02 6100-02-00 6100-02-10 6100-02-10 6100-03 6100-03-00 6100-03-10 6100-03-10 6100-04

AIX中crontab和at 定时任务

…衆ロ難τιáo~ 提交于 2019-11-27 20:46:23
1、crontab crontab文件用于在指定日期和时间周期性地执行作业 crontab 作业存放在/var/spool/cron/crontabs/$USER cron根据crontab文件项运行命令。如果用户不指定将cron作业的输出重定向到标准输出或标准错误。 cron将使用电子邮件向用户报告其输出或错误 要使用cron,用户必须建立crontab文件 cron进程将crontab文件驻留在内存中,所以用vi直接修改硬盘上的cron文件是没有效果的 必须使用crontab命令操作,它会告诉cron进程crontab文件已修改 语法: minute hour day month dayofweek command 分钟 小时 天数 月数 (0~6,0表示星期日) 示例1: 50 23 * * 6 /home/oracle/rman.sh 表示每月每天的23点50分,只要这一天星期六,就执行脚本 50:表示50分钟 23:23点 *:表示所有天 *:表示所有月 6:表示星期六 在AIX中,任务计划的使用授权控制在两个文件中: /var/adm/cron/cron.deny :定义了不允许使用cron的用户 /var/adm/cron/cron.allow :定义了允许使用c'ron的用户 如果两个文件都存在,那么只有cron.allow文件有效,如果两个文件都不存在

AIX查看系统日志

蹲街弑〆低调 提交于 2019-11-27 20:45:59
1、查看系统启动日志 在AIX中可以使用alog命令来查看系统日志。 启动日志: /var/adm/ras/bootlog /var/adm/ras/bosinstlog /var/adm/ras/conslog alog命令的常用选项 -f 指定查看一个日志文件(logfile) -L 列出当前alog配置数据库定义的日志类型和 -t一起使用 -o 输出日志文件内容(logfile文件)到标准输出设备上 -t type 指定输出的日志类型,alog命令将从alog配置数据库中获得日志文件名 #alog -L //查看系统中定义的所有日志文件 #alog -o -t boot |more //查看系统启动信息 #alog -o -t console |more //查看console日志信息 #alog -t -o lvmcfg //查看逻辑卷管理相关的日志 2、查看登录行为 #last root console |more //查看用户root从控制台登录和退出的相关信息 #last oracle | more //显示了用户Oracle用户从任意位置登录和退出的相关信息 3、系统的启动时间 #uptime 4、errpt 查看错误日志 所有AIX错误都记录在一个记录文件中/var/adm/ras/errlog •显示错误 –errpt [-a] -a 为详细显示

AIX中的服务管理

怎甘沉沦 提交于 2019-11-27 20:45:04
1、SRC AIX系统使用资源控制器(SRC,system resource controller),控制各种服务子系统,包括启动,停止进程,搜集进程状态信息等。 AIX系统中服务有子系统组(Subsystem Group)、子系统(Subsystem)、子服务(Subserver)三个层次。以便于管理和维护 2、管理命令 lssrc -s 后面跟某个子系统 // -g 后面跟某个子系统组 startsrc -s 后面跟某个子系统 // -g 后面跟某个子系统组 // -t 指定要启动的子服务 stopsrc -s 后面跟某个子系统 // -g 后面跟某个子系统组 //-t 指定要停止的子服务 refresh -s 后面跟某个子系统 // -g 后面跟某个子系统组 #smitty startssys 示例: #startsrc -s qdeamon 启动子系统 #stopsrc -s qdeamon 停止子系统 #refresh -s qdeamon 刷新子系统 #lssrc -a 显示子系统状态 #lssrc -a |more #列出属于tcpip组的所有子系统 列出某个子系统的状态: 列出某个子服务的状态: 很多服务都有各自的配置文件,比如inetd服务的配置文件是/etc/inetd.conf;sendmail服务的配置文件是/etc/sendmail.cf 。

AIX中磁带设备的使用

喜欢而已 提交于 2019-11-27 20:44:26
1、AIX中的磁带设备 在UNIX系统中,磁带一般具有如下共同属性。 磁带密度:指磁带使用时采用的低密度方式和高密度方式 回退操作:磁带一次写入操作完成后,是否立刻倒带,回退到磁带头部。 位置重置:磁带被插入磁带机后,是否保持磁带当前位置(是否将磁带回退到开始位置) 在AIX中磁带机的设备文件是/dev/rmtx。为了对应上述三种操作属性,AIX将为每个磁带驱动器创建8个磁带驱动设备文件, 即/dev/rmtx到/dev/rmtx.7 。如下表: 磁带设备的属性也可以通过lsattr命令来查看。 #lsattr -El rmt0 2、磁带管理指令 在AIX中有两个可用磁带控制命令tctl、tcopy 。 2.1 tctl指令 常用选项为-f,用于指定磁带设备,如/dev/rmt0 查看磁带机的状态: #tctl -f /dev/rmt0 status 指定磁带绕回到磁带头部: #tctl -f /dev/rmt0 rewind 删除磁带上的所有内容,并进行倒带操作: #tctl -f /dev/rmt0 erase 完成磁带快进操作,跳过磁带备份的前三个片段: #tctl -f /dev/rmt0.1 fsf 3 使用下面的指令弹出磁带: #tctl -f /dev/rmt0 offline 2.2 tcopy指令 主要用来复制磁带,语法格式: tcopy source