# su to another user

**URL:** <https://community.unix.com/t/su-to-another-user/173852>\
**Category:** Shell Programming and Scripting\
**Created:** [August 2, 2007, 3:10pm UTC](https://community.unix.com/t/su-to-another-user/173852 "2007-08-02T15:10:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![buechler66](https://community.unix.com/letter_avatar/buechler66/32/5_5575768a8748004e209b776fc1b2916d.png) [@buechler66](https://community.unix.com/u/buechler66)\
**Post date:** [August 2, 2007, 3:10pm UTC](https://community.unix.com/t/su-to-another-user/173852/1 "2007-08-02T15:10:38Z")

</div>

Hi. I want to 'su' to another user from the command line, but I want to provide the password at the same time - all in one command. I want to avoid the interactive prompt and entry of the password. Is this possible?

---

<div class="post-metadata">

**Author:** ![jim\_mcnamara](https://community.unix.com/letter_avatar/jim_mcnamara/32/5_5575768a8748004e209b776fc1b2916d.png) [@jim\_mcnamara](https://community.unix.com/u/jim_mcnamara)\
**Post date:** [August 2, 2007, 4:19pm UTC](https://community.unix.com/t/su-to-another-user/173852/2 "2007-08-02T16:19:52Z")

</div>

Check out sudo - you can set it up so that you are authorized to

```nohighlight
sudo su - newuser

```

without entering any passwords at all. You can also enable command logging of the sudo'ed newuser account if you work in a system that requires it.
