nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Solaris/OpenSolaris Discuss all about the SUN Solairs/OpenSolaris. You are free to talk about any issues related to Solaris administration, networking, services and other stuff, share information or ask doubts.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 18-05-2008, 12:47 PM
Member
User
 
Join Date: Oct 2007
OS: Linux RHEL 5
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
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
  #2 (permalink)  
Old 18-05-2008, 02:56 PM
Member
User
 
Join Date: Oct 2007
OS: Linux RHEL 5
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
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


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 Off


Similar Threads

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


All times are GMT +5.5. The time now is 03:05 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38