nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

create command aliases for a user

This is a discussion on create command aliases for a user within the Solaris/OpenSolaris forums, part of the UNIX operating systems category; Hi all, I am using Solaris 10 OS on X86. When I add a new user from command Code: useradd ...


Go Back   nixCraft Linux Forum > UNIX operating systems > Solaris/OpenSolaris

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-18-2008, 12:47 PM
Member
User
 
Join Date: Oct 2007
My distro: Linux RHEL 5
Posts: 33
Rep Power: 0
vikas027 is on a distinguished road
Question create command aliases for a user

Hi all,

I am using Solaris 10 OS on X86. When I add a new user from command
Code:
useradd -d /export/home/vikas -m -s /bin/bash vikas
files local.cshrc, local.login, local.profile and .profile get copied to my home directory (i.e. /export/home/vikas) from /etc/skel/

Which file I have to change to make command aliases and what is the format ?
for e.g. making alias of ls as ls -lrt.

Like in Linux, we have to change .bash_profile as
Code:
ls='ls -lrt'; export ls
to have this effect.

I tried this on local.profile and .profile but it wasnt working.

Also, suppose I need that each time a user logs in a script say /tmp/vikas.sh executes. How to achieve this ? Pls help !

Thanks and Regards,
Vikas
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-18-2008, 02:56 PM
Member
User
 
Join Date: Oct 2007
My distro: Linux RHEL 5
Posts: 33
Rep Power: 0
vikas027 is on a distinguished road
Default

Thanks all,

It worked by changing .profile

Quote:
alias ls='ls -ltr'
Regards,
Vikas
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to create multiple user account? droidwork Shell scripting 11 02-23-2008 01:35 PM
Unable to create user vaibhav.kanchan Getting started tutorials 3 12-07-2007 10:46 AM
how to create super user click007 Getting started tutorials 12 08-28-2007 08:14 PM
How can i create script for deleting user? Paul Shell scripting 1 08-02-2007 10:20 PM
Create new user account in Ubuntu Linux from command line sweta Getting started tutorials 0 06-21-2007 01:49 AM


All times are GMT +5.5. The time now is 06:29 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36