Changing user attributes with chuser command
The chuser command changes attributes for the user identified by the Name parameter. The user name must already exist as an alphanumeric string of eight bytes or less.
Note:
Do not use the chuser command if you have a Network Information Service (NIS) database installed on your system.
Only the root user can use the chuser command to perform the following tasks:
- Make a user an administrative user by setting the admin attribute to true.
- Change any attributes of an administrative user.
- Add a user to an administrative group.
The following examples show the use of the chuser command with various flags.
- To enable user smith to access this system remotely, enter:
- To change the date that the smith user account will expire to 8 a.m., 1 December, 1998, enter:
chuser expires=1201080098 smith
- To add smith to the group programers, enter:
chuser groups=programers smith
Alternatively, you can go through the SMIT hierarchy by:
- Running smitty chuser will prompt you to a menu as shown in Figure below.
- Type smith for the field User NAME.
- Use the Arrows key to highlight the Primary GROUP field and type programmer in it.
- Press Enter.
- When SMIT returns an OK prompt, press the F10 key to return to the command prompt.
Figurev: Changing user characteristics using SMIT
The
chuser
command works very much like mkuser
in syntax and uses the identical attributes. Listing provides an example of the chuser
command.
# chuser core=1048576 xander
# su - xander "-c ulimit -a"
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) unlimited
coredump(blocks) 1048576
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user) unlimited
|
As always, IBM has made these commands easily accessible in SMIT using fastpaths. Logically,
smitty chuser
takes you directly to the user modification screen.
No comments:
Post a Comment