How do I change the shell settings of one user ?

How do I change the shell settings of one user ?
LVL 2
MaRiOsGRAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ravenplCommented:
You mean You want to change the shell for particular user?
chsh -s /bin/tcsh username
where /bin/tcsh You may replace with user's favorite shell.
ravenplCommented:
Oh, and in addition to the above, the /bin/tcsh must be listed in
/etc/shells
MaRiOsGRAuthor Commented:
No i mean the shell settings like the enviroment variables, for a specific user.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

MaRiOsGRAuthor Commented:
Anyone ?
xDamoxCommented:
Hi,

Edit the /etc/profile this is where you can set enviroment variables. Also check /etc/skel
ravenplCommented:
> Edit the /etc/profile this is where you can set enviroment variables. Also check /etc/skel
Hence /etc/profile is executed for each user is logging in.
And even if You set some variables there, user will be able to override them. But If You set some limits there, ther's no way back.

As I said, user can overwrite env vars, as he owns them. (and he can do it in
$HOME/.bash_profile $HOME/.bashrc $HOME/.profile - read the documentation to know when which is executed)

If You still want to do in /etc/profile, then You could do something like:
if [ _$USER = "_username1" ]; then
 code for the user1
elif [ [ _$USER = "_username2" ]; then
 code for user2
fi

the /etc/skel/ is a directory, which is copied to user home directory while creating new user, and has not much to do with this matter.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chris_calabreseCommented:
/etc/profile sets for all users.
But each user also has their own profile. It will be $HOME/.profile for sh, ksh, bash, and other sh-derivatives. It will be $HOME/.login for csh, tcsh, and other csh-derivatives.
MaRiOsGRAuthor Commented:


I just found that the user has no ssh access :

psaadm:x:502:500:Plesk user:/usr/local/psa/admin:/bin/false

its a user created by plesk panel..
xDamoxCommented:
Same problem as on the su question :D
xDamoxCommented:
who gets the points?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.