Itanium服务器
1754064 成员
3537 在线
108811 解答
新建帖子

hpux11.31修改长用户名

 
GoldenFaith
见习顾问

hpux11.31修改长用户名

HPUX默认用户名是8个byte,即8个英文字符.

使用lugadmin -l 可以查看是否启用了长主机名方法如下:
sd2-3#[/]lugadmin -l    
64
这里显示64即未启用 ,如果是256即启用了长用户名
 
修改方法如下:
sd2-3#[/]lugadmin -e
lugadmin: Error: The pwgrd daemon must be killed before enabling the system.
The daemon can be restarted once the system is enabled
 
这里报错,需要先kill -9掉/usr/sbin/pwgrd进程 
sd2-3#[/]ps -ef|grep -i pwgrd
    root  5672     1  0  Nov 15  ?        10:11 /usr/sbin/pwgrd
sd2-3#[/]kill -9 5672
 
sd2-3#[/]ps -ef|grep -i pwg
    root  4413  4370  0 23:04:29 pts/0     0:00 grep -i pwg
 
sd2-3#[/]lugadmin -e
Warning: Long user/group name once enabled cannot be disabled in future.
Do you want to continue [yY]: y
lugadmin: Note: System is enabled for long user/group name
系统一旦启用长用户名就不能再关闭 
 
sd2-3#[/]lugadmin -l
256
然后重启进程:
sd2-3#[/]/usr/sbin/pwgrd --这里不用加start
sd2-3#[/]ps -ef|grep pwgrd
    root  4604  4370  0 23:16:21 pts/0     0:00 grep pwgrd
    root  4602     1  0 23:16:18 ?         0:00 /usr/sbin/pwgrd