Home | Contact | Rants | Software Tips | GTMO | Web Design | Jokes | Windows Tweaks | Quotes | About Me
 
UNIX Menu
Basic Commands Separated by Usage

Brown Line Microsoft Windows NT Tips
Unlock User Account
./clear_failures username

(i.e.: ./clear_failures sobroti) this unlocks sobroti user login account.

bbb
Check % size of Directories
cd to the directory, and type df -k to get percentage used for it.

I.e. at root on Alphamastermia, cd  /CAWS

df -k

bbb
Stop & Start Machine
rlogin workstation_name –l root

ps -ef | grep wmw

cd /etc/rc2.d (sun)
cd /etc/rc3.d (dec)

./S99cse_xdm stop
./S99cse_xdm start

Note:
If unable to log into user workstation, use "Stop" "A" command on keyboard on local machine.  When prompted, type, "boot"  Workstation shuts down and restarts.

bbb
Miaclear Reboot

rlogin miaclear -l root

cd /etc/rc2.d (sun)

./S99cse_xdm stop
./S99cse_xdm start

("reboot" could be used as well as S99cse_xdm stop)

Note:
You must be client to perform the above reboot.

bbb
Change File Owner and Group
Change Owner:
  • locate file directory.
  • Use "ls" command to view default directory structure.
  • chown filename ownername
    (i.e. chown test.doc sobroti)

Note:
"-R" (recursive) qualifier may be used to change entire directory structure.
(i.e chown -R * sobroti)

 

Change Group:

  • locate file directory.
  • Use "ls" command to view default directory structure.
  • chgrp filename groupname
    (i.e. chown test.doc idhs_team)

Note:
"-R" (recursive) qualifier may be used to change entire directory structure.
(i.e chown -R * idhs_team)

bbb
Display Directory Capacity and Structure

The df command displays the amount of disk space occupied by mounted or un-mounted file systems, directories, or mounted resources, the amount of used and available space and how much of the file system's total capacity has been used.

df -k
(displays the aforementioned)

df -k .
(displays aforementioned for current residing directory)

bbb
Clear Failures

If customer inadvertently locks account attributed to excessive log-in failures, use the following command to remedy immediate issue.

rlogin into offending workstation
(i.e. rlogin miaimg123 -l root)

/opt/solaris/cse/bin/clear_failures username (sobroti)

.......................

Step Two
Note of interest:
Prior to steps 2 and 3, make copy of "passwd" and "shadow" files.  Also, insure copies have proper permission set as not to let World access.

a. more /etc/passwd
(find the locked out user)

Step Three
a. more /etc/shadow
(find the locked out user)

bbb
Copy Files to Remote Workstation

rcp file_name destination_workstation:/destination_Directory

(i.e.: rcp test.txt miaimg214:/etc/lp)

bbb
Print from XTerm
lp -d printer_name /directory/file_name
bbb
Rename "Home" Directory
  • rlogin miawsa022 -l root
  • cd /home/homeserver
  • mv older_directory_name new_directory_name
bbb
Locate Specific File
find path -mount -name filename -print
(path = use desired path name find command should start from)
i.e. /home/TEAMS/Analysis_Division
bbb
 
 
 
 
 
 
 
 
 

...
Locate Large Files
find /usr -mount -size +3000 -exec ls -l {} \;
 
Users logged in Remotely
rusers


Tells you which users are logged in on remote machines. Useful for finding out who is in today. This is better than ping because it tells you who is logged into the system, not just if a machine has been turned on. This command outputs the machine name and userid:

    cupid lljohns
    orion bcsmith
    bigdog jmdoe
Are you Up?
rup

aRe you UP - tells you whether a machine is up and working.

    machine name status # minutes up load average
    miaimg666 up 12 min, load average: 0.0, 0.0, 0.0
If the machine is not up you get the message:
    miaimg666: RPC: Port mapper failure

Note:
You will only get a response from workstations that are running the rstatd daemon.

List Online Users
who

The who utility can list the user's  name,  terminal  line, login  time,  elapsed  time  since  activity occurred on the line, and the process-ID of the command interpreter  (shell) for   each   current  UNIX  system  user.  It  examines  the /var/adm/utmp file to obtain its  information.  If  file  is given,  that file (which must be in utmp(4) format) is exam- ined. Usually, file will be /var/adm/wtmp, which contains  a history of all the logins since the file was last created.

OPTIONS
The following options are supported:

-a Process /var/adm/utmp or the named file with -b, -d, -l, -p, -r, -t, -T, and -u options turned on.

-b Indicate the time and date of the last reboot.

-d Display all processes that have expired and not been respawned by init. The exit field appears for dead processes and contains the termination and exit values (as returned by wait(3UCB)), of the dead process. This can be useful in determining why a process terminated.

-H Output column headings above the regular output.

-l List only those lines on which the system is waiting for someone to login. The name field is LOGIN in such cases. Other fields are the same as for user entries except that the state field does not exist.

-m Output only information about the current terminal.

-n x Take a numeric argument, x, which specifies the number of users to display per line. x must be at least 1. The -n option may only be used with -q.

-p List any other process which is currently active and has been previously spawned by init. The name field is the name of the program executed by init as found in /sbin/inittab. The state, line, and idle fields have no meaning. The comment field shows the id field of the line from /sbin/inittab that spawned this process.

-q (quick who) display only the names and the number of users currently logged on. When this option is used, all other options are ignored.

-r Indicate the current run-level of the init process.

-s (default) List only the name, line, and time fields.

/usr/bin/who
-T Same as the -s option, except that the state idle, pid, and comment, fields are also written. state is one of the following characters:

Change User Password Before it Expires
When a UNIX password is about to expire please utilize the background menu on a UNIX box. You will see a Utilities selection and then Set Password. Do not use ISSO to change passwords that are about to expire, use a UNIX box.
 
TUATM: Microsoft Windows Tips and Tweaks
 
TUATM: Microsoft Windows Tips and Tweaks
Home | Contact | Rants | Software Tips | GTMO | Web Design | Jokes | Windows Tweaks | Quotes | About Me
TUATM: Microsoft Windows Tips and Tweaks