Basic UNIX Commands for NetScaler

This article provides basic overview of UNIX commands used on the NetScaler system and basic commands for the vi editor.

Getting to the Shell Command Prompt

To get to the shell, type shell at the NetScaler CLI. To return back to the NetScaler CLI, type exit.

When in the shell, the following tips will help simplify typing and navigation:

  • Use the up or down arrow keys to use previous or next commands.

  • Use the Tab key to auto complete a command or filename.

  • Press the Tab key twice to see the available commands or filenames that match what is typed so far.

  • Use the history command to show all commands that are previously used.

  • Use the exclamation (!) symbol to execute a particular history ID. For example, !362.

Common Commands for Directories

pwd – Shows the current directory.

Example:

root@ns# pwd

/var/nstrace/

root@ns#

cd – Changes the directory to a parent directory or a subdirectory.

Examples:

rooot@ns# cd /var/nstrace/

Changes to the /var/nstrace/ directory from any point because it is explicitly from the /.

root@ns# cd ..

Changes to the parent directory.

root@ns# cd nstrace

Changes directory to nstrace from current directory.

ls – Used for listing content such as files and subdirectories in the current directory.

Examples:

root@ns# ls –al
– List files, directories and link with the following detail.

root@ns# ls –al

total 643611

drwxr-xr-x 2 root wheel 3072 Feb 15 15:05 .

drwxr-xr-x 29 root wheel 512 Feb 14 2005 ..

-rw-r–r– 1 root wheel 15370 Feb 13 15:05 dmesg.boot

-rw-r–r– 1 root wheel 15370 Feb 13 13:22 dmesg.last

-rw-r–r– 1 root wheel 15374 Feb 9 14:39 dmesg.prev

-rw-r–r– 1 root wheel 98592 Feb 17 10:03 newnslog

-rw-r–r– 1 root wheel 23194 Feb 7 09:29 newnslog.0.gz

-rw-r–r– 1 root wheel 23786 Feb 9 09:30 newnslog.1.gz

-rw-r–r– 1 root wheel 10086 Aug 2 15:53 newnslog.10.gz

permissions, owner, group, size, creation date and file name.

root@ns# ls –ltr – List files, directories sorted by date/time with the latest being the last.

Example:

root@ns# ls –ltr

total 643223

-rw-r–r– 1 root wheel 29517 May 2 2005 ns.reboots

-rw-r–r– 1 root wheel 752 May 2 2005 nslog.log

-rw-r–r– 1 root wheel 1702764 Aug 14 2005 newnslog.7.gz

-rw-r–r– 1 root wheel 1126553 Aug 16 2005 newnslog.8.gz

-rw-r–r– 1 root wheel 1191421 Aug 18 2005 newnslog.9.gz

-rw-r–r– 1 root wheel 1003186 Aug 20 15:53 newnslog.10.gz

-rw-r–r– 1 root wheel 1127304 Aug 22 15:53 newnslog.11.gz

-rw-r–r– 1 root wheel 1563115 Aug 24 15:53 newnslog.12.gz

root@ns# cd ../../../opt – Changes to the parent of the parent of the parent and to the opt subdirectory in one command.

root@ns# cd ~ – Changes directory to the users home directory from any where.

date – Used to get the date and time of a UNIX/Linux system.

Example:

root@ns# date

Tue Nov 9 12:34:14 EST 2004

ifconfig – Displays the kernel-resident network interfaces.

Example:

root@ns# ifconfig –a

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000 hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu 1500 index 2

inet 10.3.1.59 netmask ffff0000 broadcast 10.3.255.255 ether 8:0:20:f9:9:14

ps – Used for listing the process running on the system. ps has many switches –ax will show the most popular information.

Note: The ps command output on NetScaler does not correctly represent the process values. This is normal and great emphasis should not be placed on its output when determining the system status and load.

Example:

root@ns# ps -ax

UID PID PPID C STIME TTY TIME CMD
root 0 0 0 Nov 17 ? 0:17 sched
root 1 0 0 Nov 17 ? 0:00 /etc/init –
root 2 0 0 Nov 17 ? 2:47 pageout
root 3 0 0 Nov 17 ? 0:00 fsflush
root 292 1 0 Nov 17 ? 0:00 /usr/lib/saf/sac -t 300
root 219 1 0 Nov 17 ? 0:00 /usr/lib/utmpd

cat – This command is used to display the content of a text file. By default this command gives one full screen of text.

Example:

root@ns# cat /etc/hosts

127.0.0.1 localhost

10.3.1.59 fltr-user1-sol1 loghost

10.3.10.2 fltr-user1-1

zcat – This command is used to display the content of a text file that is compressed by gzip that has the “.gz” extension. By default this command gives one full screen of text.

Example:

root@ns# gzcat /etc/hosts.gz

127.0.0.1 localhost

10.3.1.59 fltr-user1-sol1 loghost

10.3.10.2 fltr-user1-1

less – This command is used to display the content of a text file and will allow you to scroll backwards and forwards in the file using the arrow keys.

grep – Searches the named input file(s) for lines containing a match to the given pattern.

cat <file> | grep <match>

Example:

root@ns# more ctxXtw.sh | grep ctxXtw

# ctxXtw launcher

# See the file ctxXtw.readme.

XTW=${1}ctxXtw

tail – Displays the last 10 lines of a text file.

Examples:

root@ns# tail /etc/hosts

root@ns# tail -50 /etc/hosts

You can specify a number of last lines to display by -<num>.

root@ns# tail -f /var/log.file

You can use tail to monitor a text file as it is being modified with the –f.

history – This command lists all shell commands that were previously issued.

Example:

root@ns# history

1 netstat –rn

2 exit

3 cd /etc

4 ls

5 cd group

You can use the exclamation (!) symbol with a history ID to issue the command.

Note: For more information, refer to the NetScaler Administrator’s Guide.

Related:

  • No Related Posts

Sudo Privilege Escalation Vulnerability Affecting Cisco Products: January 2021

A vulnerability in the command line parameter parsing code of Sudo could allow an authenticated, local attacker to execute commands or binaries with root privileges.

The vulnerability is due to improper parsing of command line parameters that may result in a heap-based buffer overflow. An attacker could exploit this vulnerability by accessing a Unix shell on an affected device and then invoking the sudoedit command with crafted parameters or by executing a binary exploit. A successful exploit could allow the attacker to execute commands or binaries with root privileges.

This advisory is available at the following link:
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM

Security Impact Rating: High

CVE: CVE-2021-3156

Related:

  • No Related Posts

Steps to uninstall MAC receiver properly

1.Launch the Terminal app on your Mac by either searching for it in Spotlight or locating it in the Utilities folder under Applications.

2.Type in the following command: “sudo rm -r” (without quotes) and then drag and drop the receiver on the terminal window.

Note : “sudo rm -r” is most powerful command which will delete all the files and directories under the present working directory, please make sure you are executing this command under correct required directory

3.Hit Enter on your keyboard.

4.You may be prompted to enter your OS X user password. Type it in and then hit Enter on your keyboard.

5.All the directories & files would be successfully removed.

6.Install the latest receiver and test.

Related:

ShareFile Clone User Permissions

Clone User Permissions

Cloning an existing user’s permissions is a quick and easy way to assign similar folder permissions to multiple users or clients.

On the People on this Folder view, click the check-box to the left of the user with permissions you would like to clone and click on “Clone User“. This will open a menu where you can search for existing users or create new ones.

Once you have selected or created the users you would like to add, you can choose to notify the new users that they have been granted permission to this folder. These users will inherit the folder permissions and upload/download alerts for the current folder, as well as any subfolders. Click Clone when finished.

Note: You cannot clone permissions from a Distribution Group or the Super User Group to another user. Instead, consider adding the user to the group itself!

Related:

Administrators of a different forest are unable to log on to PVS Console

SOLUTION 1:

In the registry setting, locate HKEY_LOCAL_MACHINESOFTWARECitrixProvisioningServices:

Create a DWORD named “DomainSelectOption”.and value:7

SOLUTION 2:

1. Create a group and add that user account to the group.

2. Give Admin rights to the group.

3. Add this group in PVS farm properties.

Reference :

https://support.citrix.com/article/CTX120080

and

https://docs.citrix.com/en-us/provisioning/7-15/install/pre-install.html

SOLUTION 3:

Try with an user account which is not part of large number of security groups.

SOLUTION 4:

1. Remove the service account from local users on PVS console.

2. Re-run the configuration wizard using the admin account

3. Try to open the console

SOLUTION 5:

Add the user to one of the groups configured in the Farm

§ You can do this through Active Directory. Please remember to logout that user from Windows and log back in for the group membership to take effect

§ You can also use a known good admin to login to the PVS Console and add a group to the Farm that the non-working user belongs to

Related:

  • No Related Posts

How To Configure Standalone SQL Server, Database Mirroring, and Always on High Availability.

For the Standalone SQL Server Connection String: “Server=SQLServerName; Initial Catalog=DBName ; Integrated=True ”

User-added image

For the Database Mirroring Connection String: “Server=PrimarySQLServerName; Initial Catalog=DBName ; Integrated=True ; Failover Partner=SecondSQLServer”

User-added image

For Always on High Availability: “Server=ListenerName; Initial Catalog=XDdb;Integrated Security=True; MultiSubnetFailover=True”

User-added image

Steps to Update the Connection Strings:

  1. Take the Backup of the Databases and snapshot of all the Controllers.

  2. Only on 1st Controller, stop and clear the Datastore connections:

    Set-LogSite -State “Disabled”

    Set-MonitorConfiguration -DataCollectionEnabled $False

    Set-MonitorDBConnection -DataStore Monitor -DBConnection $null -AdminAddress $Localhost

    Set-LogDBConnection -Datastore Logging -DBConnection $null -AdminAddress $Localhost

  3. On all the other Controllers, reset their datastore configuration (which reads the cleared setting above)

    Reset-MonitorDataStore –DataStore Monitor –AdminAddress $Localhost

    Reset-LogDataStore –DataStore Logging –AdminAddress $Localhost

  4. On every Controller you need to disconnect all the services from the database, note that the order here is important, the last two cmdlets must be at the end:

    Set-SfDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-EnvTestDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-MonitorDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-BrokerDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-ProvDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-HypDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-AcctDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-ConfigDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-AnalyticsDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-LogDBConnection -DBConnection $null -AdminAddress $Localhost

    Set-AppLibDBConnection -DBConnection $null -AdminAddress $Localhost (For 7.15)

    Set-OrchDBConnection -DBConnection $null -AdminAddress $Localhost (For 7.15)

    Set-TrustDBConnection -DBConnection $null -AdminAddress $Localhost (For 7.15)

    Set-AdminDBConnection –Force -DBConnection $null -AdminAddress $Localhost

  5. At this stage your site will have no db connectivity. The next step is to hook all the services back up to the site database:

  6. $csSite =” Server=<ListenerName>; Initial Catalog=<DBName>; Integrated Security=True; MultiSubnetFailover=True”

    $csMonitor =” Server=<ListenerName>; Initial Catalog=<Monitor_DBName>; Integrated Security=True; MultiSubnetFailover=True”

    $csLog =” Server=<ListenerName>; Initial Catalog=<Log_DBName>; Integrated Security=True; MultiSubnetFailover=True”

    Set-AdminDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-LogDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-AnalyticsDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-ConfigDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-AcctDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-HypDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-ProvDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-BrokerDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-MonitorDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-EnvTestDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-SfDBConnection -DBConnection $csSite -AdminAddress $Localhost

    Set-AppLibDBConnection -DBConnection $csSite -AdminAddress $Localhost (For 7.15)

    Set-OrchDBConnection -DBConnection $csSite -AdminAddress $Localhost (For 7.15)

    Set-TrustDBConnection -DBConnection $csSite -AdminAddress $Localhost (For 7.15)

  7. Then on one Controller only, set the datastore connections and enable them:

    Set-MonitorDBConnection -DataStore Monitor -DBConnection $csMonitor -AdminAddress $Localhost

    Set-LogDBConnection -Datastore Logging -DBConnection $csLog -AdminAddress $Localhost

    Set-LogSite -State “Enable”

    Set-MonitorConfiguration -DataCollectionEnabled $True

  8. And on all the other Controller, reset their datastore configuration

    Reset-MonitorDataStore –DataStore Monitor –AdminAddress $Localhost

    Reset-LogDataStore –DataStore Logging –AdminAddress $Localhost

Related:

  • No Related Posts

Unable to start VMs in new Hosts – An emulator required to run this VM failed to start

Unable to start VM with vGPOU assigned on HOST with NVIDIA Card.

Getting error:

vm-start failed: “An emulator required to run this VM failed to start”


Internal LOG:

Dec 6 09:10:13 localhost vgpu-2[11384]: demu_initialize: PLUGIN CONFIG: /usr/share/nvidia/vgx/grid_p40-1b.conf,gpu-pci-id=0000:d8:00.0Dec 6 09:10:13 localhost vgpu-2[11384]: notice: pluginconfig: /usr/share/nvidia/vgx/grid_p40-1b.conf,gpu-pci-id=0000:d8:00.0Dec 6 09:10:13 localhost vgpu-2[11384]: notice: Loading Plugin0: libnvidia-vgpuDec 6 09:10:13 localhost vgpu-2[11384]: notice: Successfully update the env symbols!Dec 6 09:10:13 localhost vgpu-2[11384]: error: vmiop_log: Initialization: vGPU not supported with ECC Enabled.#012 error 0Dec 6 09:10:13 localhost vgpu-2[11384]: error: vmiop_log: init_device_instance failed for inst 0 with error 1Dec 6 09:10:13 localhost vgpu-2[11384]: error: vmiop_log: Initialization: init_device_instance failed error 1Dec 6 09:10:13 localhost vgpu-2[11384]: error: vmiop_log: display_init failed for inst: 0Dec 6 09:10:13 localhost vgpu-2[11384]: error: vmiope_process_configuration: plugin registration errorDec 6 09:10:13 localhost vgpu-2[11384]: demu_initialize: vmiope_process_configuration failed with 1Dec 6 09:10:13 localhost vgpu-2[11384]: __set_error: Demu is returing error vmiopDec 6 09:10:13 localhost vgpu-2[11384]: demu_teardown: <VMIOP_VGA_INITIALIZEDDec 6 09:10:13 localhost vgpu-2[11384]: demu_deregister_memory_space: a0000 - bffff

Related:

Patch Management API

I do not need a solution (just sharing information)

Patch Management Workflow Web Service Application Programming Interface (API)

DOC11543

https://support.symantec.com/us/en/article.doc11543.html

0

Related:

During the installation of symantec in linux shows me this Error: No drivers are loaded into kernel

I need a solution

[root@localhost paquetelinuxrpm]# sudo ./install.sh -i
Starting to install Symantec Endpoint Protection for Linux
Performing pre-check…
Pre-check succeeded
Begin installing virus protection component
Preparando…                         ################################# [100%]
Performing pre-check…
Pre-check is successful
Actualizando / instalando…
   1:sep-14.2.3335-1000               ################################# [100%]
Virus protection component installed successfully
Begin installing Auto-Protect component
Preparando…                         ################################# [100%]
Performing pre-check…
Pre-check is successful
Actualizando / instalando…
   1:sepap-x64-14.2.3335-1000         ################################# [100%]
Auto-Protect component installed successfully
Begin installing GUI component
Preparando…                         ################################# [100%]
Performing pre-check…
Pre-check is successful
Actualizando / instalando…
   1:sepui-14.2.3335-1000             ################################# [100%]
GUI component installed successfully
Pre-compiled Auto-Protect kernel modules are not loaded yet, need compile them f                                                                                        rom source code
Build Auto-Protect kernel modules from source code failed with error: 1
Running LiveUpdate to get the latest defintions…
Update was successful
Installation completed
=============================================================
Daemon status:
symcfgd                         [running]
rtvscand                        [running]
smcd                            [running]
=============================================================
Error: No drivers are loaded into kernel.
=============================================================
Auto-Protect starting
Protection status:
Definition:     Waiting for update.
AP:             Malfunctioning
=============================================================
The log files for installation of Symantec Endpoint Protection for Linux are und                                                                                        er ~/:
sepfl-install.log
sep-install.log
sepap-install.log
sepui-install.log
sepfl-kbuild.log

0

Related: