- 论坛徽章:
- 5
|
- [root@s2 ~]# tail -2 /etc/passwd
- test-1:x:500:500::/home/test-1:/bin/bash
- test-2:x:501:501::/home/test-2:/bin/bash
- [root@s2 ~]# tail -2 /etc/group
- test-1:x:500:test-2
- test-2:x:501:
- [root@s2 ~]# su - test-2
- [test-2@s2 ~]$ cd /opt/test
- [test-2@s2 test]$ ll
- 总计 4
- -rw-rw-r-- 1 test-1 test-1 26 12-22 10:57 test.txt
- [test-2@s2 test]$ cat test.txt
- hello
- world
- test-1
- test-2
- [test-2@s2 test]$ vi test.txt
- [test-2@s2 test]$ more test.txt
- hello
- world
- test-1
- test-2
- test-3
- [test-2@s2 test]$ id test-2
- uid=501(test-2) gid=501(test-2) groups=501(test-2),500(test-1)
- [test-2@s2 test]$
复制代码 试了下,没问题。。 |
|