
Example 8.3
Removing Multiple Users
#!/bin/bash
#
# the home will be not deleted
# to delete homes, use option delete_home
#
for i in `cat /tmp/users.txt`;
do
yast users delete username=$i
done
8.13.2 Configuring the Network and Firewall
Network and firewall configuration commands are often wanted in scripts. Use
yast
lan
for network configuration and
yast firewall
.
To display the YaST network card configuration options, enter
yast lan help
. To
display the YaST firewall card configuration options, enter
yast firewall help
.
The network and firewall configurations with YaST are persistent. After reboot, it is
not necessary to execute scripts again.
To display a configuration summary for the network, use
yast lan list
. The first
item in the output of
Example 8.4, “Sample Output of
yast lan list
”
(page 185)
is a device ID. To get more information about the configuration of the device, use
yast
lan show id=<number>
. In this example, the correct command is
yast lan
show id=0
.
Example 8.4
Sample Output of yast lan list
0 Digital DECchip 21142/43, DHCP
The command line interface of the YaST firewall configuration is a fast and easy way
to enable or disable services, ports, or protocols. To display allowed services, ports,
and protocols, use
yast firewall services show
. For examples of how to
enable a service or port, use
yast firewall services help
. To enable mas-
querading, enter
yast firewall masquerade enable
.
System Configuration with YaST
185
Summary of Contents for LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Page 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Page 14: ......
Page 19: ...Part I Deployment...
Page 20: ......
Page 60: ......
Page 128: ......
Page 243: ...Part II Administration...
Page 244: ......
Page 274: ......
Page 312: ......
Page 348: ......
Page 380: ......
Page 381: ...Part III System...
Page 382: ......
Page 438: ......
Page 452: ......
Page 478: ......
Page 486: ......
Page 498: ......
Page 512: ......
Page 558: ......
Page 559: ...Part IV Services...
Page 560: ......
Page 652: ......
Page 670: ......
Page 742: ......
Page 754: ......
Page 796: ......
Page 817: ...Part V Security...
Page 818: ......
Page 858: ......
Page 886: ......
Page 910: ......
Page 911: ...Part VI Troubleshooting...
Page 912: ......
Page 924: ......