时间: 2020-11-25|51次围观|0 条评论

Installing sudo on HP-UX

1. check your OS and server architecture to know which package
to download. Use the uname command.
If it’s an PA-RISC 2.0 architecture, you will normally see
something like this:
# uname -an
HP-UX darwin B.11.11 U 9000/800 1234567 unlimited-user license

else if it’s an Itanium 2
# uname -an
HP-UX darwin B.11.31 U ia64 0987654321 unlimited-user license

From here you can see, the following
HP-UX operating system name
darwin hostname/system name
B.11.11 operating system release identifier
U operating system version identifier
9000/800 machine and model numbers
1234567 machine identification number
unlimited-user operating system license level

2. Go to my favorite Porting and Archiving Centre for HP-UX
based in UK and search the needed packages. URL will be
http://hpux.connect.org.uk

3. Search for package name or description
4. For this tutorial, I will demonstrate how to install it
on a Itanium. Search for “sudo” and download the
necessary package depending on your OS version and
architecture.If you will point your mouse on the HTTP or
FTP link, it will tell you to “Install
gettext,libiconv,zlib first”meaning those are the
dependencies required.
5. Download the following packages

gettext-0.18.1.1-ia64-11.23.depot.gz
libiconv-1.14-ia64-11.23.depot.gz
sudo-1.8.4p2-ia64-11.23.depot.gz
zlib-1.2.6-ia64-11.23.depot.gz

6. Move it to a specified folder if you want, then uncompress it
#gunzip *.gz
7. Install the package as follow:
swinstall -s /etc/sudo-1.8.4p1-hppa-11.23.depot \*
swinstall -s /home/darwin/libiconv-1.14-ia64-11.23.depot \*
swinstall -s /home/darwin/gettext-0.18.1.1-ia64-11.23.depot \*
swinstall -s /home/darwin/zlib-1.2.6-ia64-11.23.depot \*
swinstall -s /home/darwin/sudo-1.8.4p2-ia64-11.23.depot \*

Configuring sudo

1. Normally installation path will be on /usr/local as in files
will be in
/usr/local/bin/sudo
/usr/local/sbin/visudo
/usr/local/etc/sudoers

2. Add user or group in the sudoers using visudo
example

darwin ALL=(ALL) ALL
%group ALL=(ALL) ALL

3.To test if sudo works already, login as normal user and tried this
$ ls -l /usr/local/etc/sudoers
-r–r—– 1 root root 142 Apr 13 12:47 /usr/local/etc/sudoers
$ more /usr/local/etc/sudoers
/usr/local/etc/sudoers: Permission denied
$ sudo more /usr/local/etc/sudoers
Password:
darwin ALL=(ALL) AL
%system ALL=(ALL) ALL

From here can see, cannot display the file sudoers because the
file permission is for root only. When use “sudo”, it is like
temporarily switching a normal user to root to see or
execute commands

Tip:
As default installation, sudo files will be on /usr/local,
so to make your life easier, add it in your path
export PATH=$PATH:/usr/local/bin:/usr/local/sbin

or to make it permanent, put it in your profile path
/home/darwin/.profile

============================================================================================================================================================================================

Step  1:Connect the SITE to download  HP-UX  packages.Use  search  option to check  package

HP-UX Install SUDO插图

 

 

 

 

 

 

 

Step 2:Download   dependencies.Before download  dependencies  check your  server  if  this  package already  installed.

Shell #swlist -l  product|grep  -i  <packagename>

1 #swlist -l  product|grep  -i  <packagename>

HP-UX Install SUDO插图1

 

 

 

 

 

Step 3:Download  all packages  that you need . Be  careful  which  release  you need to download.

OS Version:

Shell uname  -a

1 uname  -a

Shell #machinfo

1 #machinfo

 

 

HP-UX Install SUDO插图2

 

 

 

 

 

 

Step  4:Install packages with  “swinstall”  command.

Shell #swinstall  -s  /tmp/packages/libzip-0.11.2-ia64-11.31.depot  \*

1 #swinstall  -s  /tmp/packages/libzip-0.11.2-ia64-11.31.depot  \*

 

Step 5:After  install all  packages  use “ldd” command for  missing binaries.

Shell #ldd /usr/local/bin/sudo

1 #ldd /usr/local/bin/sudo

转载于:https://www.cnblogs.com/crossworld/p/9289584.html

原文链接:https://blog.csdn.net/weixin_30342827/article/details/96633532

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《HP-UX Install SUDO
   

还没有人抢沙发呢~